/* ============================================================
   ROMAIN GUARNOTTA — PORTFOLIO
   Design system : Light & Minimal · Accent .NET violet
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --accent: #512bd4;
    --accent-light: #f0edff;
    --accent-mid: #7c3aed;
    --accent-dark: #3b1fa0;
    --navy: #1a1a2e;
    --slate: #4a4a60;
    --muted: #8888a0;
    --border: #e8e8ef;
    --bg: #ffffff;
    --bg-off: #f9f8ff;
    --bg-alt: #f4f3fb;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(81, 43, 212, .08), 0 4px 16px rgba(81, 43, 212, .04);
    --shadow-hover: 0 4px 12px rgba(81, 43, 212, .14), 0 8px 24px rgba(81, 43, 212, .08);
    --transition: .2s cubic-bezier(.4, 0, .2, 1);
    --nav-h: 60px;
    --max-w: 1100px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--navy);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

strong {
    font-weight: 600;
}

/* ── Utilitaires ────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), background var(--transition);
}

.nav.scrolled {
    border-color: var(--border);
}

.nav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav__brand {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--navy);
    white-space: nowrap;
}

.nav__brand-bracket {
    color: var(--accent);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav__link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--slate);
    transition: color var(--transition);
}

.nav__link:hover,
.nav__link--active {
    color: var(--accent);
}

.nav__cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 6px 16px;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}

.nav__cta:hover {
    background: var(--accent);
    color: #fff;
}

/* Burger mobile */
.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav__burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__burger.open span:nth-child(2) {
    opacity: 0;
}

.nav__burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Focus accessibility ────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius);
}

/* ── Boutons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(81, 43, 212, .3);
}

.btn--primary:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 14px rgba(81, 43, 212, .4);
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--bg-alt);
    color: var(--navy);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

/* ── Sections ───────────────────────────────────────────────── */
.section {
    padding: 96px 0;
}

.section--alt {
    background: var(--bg-off);
}

.section__header {
    margin-bottom: 52px;
}

.section__label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: .02em;
}

.section__title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 12px;
}

.section__desc {
    font-size: 16px;
    color: var(--slate);
    max-width: 560px;
}

/* ── Animations scroll ──────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .55s cubic-bezier(.4, 0, .2, 1), transform .55s cubic-bezier(.4, 0, .2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 48px) 0 64px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -160px;
    right: -160px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(81, 43, 212, .07) 0%, transparent 70%);
    pointer-events: none;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid rgba(81, 43, 212, .2);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.hero__badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .2);
}

.hero__title {
    font-size: clamp(36px, 6vw, 60px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.05;
    letter-spacing: -.02em;
    margin-bottom: 12px;
}

.hero__accent {
    color: var(--accent);
}

.hero__role {
    font-size: 17px;
    font-weight: 500;
    color: var(--slate);
    margin-bottom: 8px;
}

.hero__tagline {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}

.hero__sub {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero__stats {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.hero__stat {
    display: flex;
    flex-direction: column;
}

.hero__stat-n {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 500;
    color: var(--navy);
    line-height: 1;
}

.hero__stat-l {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.hero__stat-sep {
    width: 1px;
    height: 32px;
    background: var(--border);
}

.hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Code window */
.hero__code-wrap {
    position: relative;
}

.hero__code-window {
    background: #1a1a2e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(26, 26, 46, .3), 0 0 0 1px rgba(255, 255, 255, .06);
}

.hero__code-titlebar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    background: #14142a;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.hero__code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hero__code-dot--red {
    background: #ff5f57;
}

.hero__code-dot--yellow {
    background: #febc2e;
}

.hero__code-dot--green {
    background: #28c840;
}

.hero__code-filename {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, .35);
}

.hero__code {
    padding: 20px 22px 22px;
    overflow-x: auto;
}

.hero__code code {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.85;
    display: block;
}

/* Syntax tokens */
.tok-cm {
    color: #546e7a;
    font-style: italic;
}

.tok-kw {
    color: #c792ea;
}

.tok-tp {
    color: #82aaff;
}

.tok-fn {
    color: #c3e88d;
}

.tok-st {
    color: #f07178;
}

.tok-op {
    color: #89ddff;
}

.tok-nm {
    color: #f78c6c;
}

.tok-wh {
    color: #eeffff;
}

.hero__code-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    bottom: -14px;
    right: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: #22c55e;
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.hero__code-tag svg {
    color: #22c55e;
}

/* Scroll hint */
.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(6px);
    }
}

/* ── À PROPOS ────────────────────────────────────────────────── */
.about__grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 56px;
    align-items: start;
}

.about__photo-wrap {
    position: relative;
}

.about__photo-placeholder {
    width: 220px;
    height: 260px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: var(--muted);
    font-family: var(--font-mono);
    overflow: hidden;
}

.about__photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about__photo-accent {
    position: absolute;
    bottom: -12px;
    right: -12px;
    width: 80px;
    height: 80px;
    background: var(--accent-light);
    border: 1px solid rgba(81, 43, 212, .15);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.about__intro {
    font-size: 17px;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.65;
    margin-bottom: 14px;
}

.about__text {
    font-size: 15px;
    color: var(--slate);
    line-height: 1.75;
    margin-bottom: 12px;
}

.about__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.chip {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid rgba(81, 43, 212, .15);
    padding: 4px 12px;
    border-radius: 20px;
}

.about__links {
    margin-top: 4px;
}

.about__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--slate);
    margin-right: 8px;
    transition: all var(--transition);
}

.about__social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* ── TIMELINE EXPÉRIENCES ────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
    border-radius: 2px;
}

.timeline__item {
    position: relative;
    margin-bottom: 36px;
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__marker {
    position: absolute;
    left: -28px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-off);
    border: 2px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
}

.timeline__marker--active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(81, 43, 212, .15);
}

.timeline__card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.timeline__card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(81, 43, 212, .2);
}

.timeline__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.timeline__role {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 3px;
}

.timeline__company {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
}

.timeline__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.timeline__type {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 2px 9px;
    border-radius: 20px;
}

.timeline__date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.timeline__projects {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeline__project {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.timeline__project:first-child {
    padding-top: 0;
    border-top: none;
}

.timeline__project-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.timeline__project-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0;
}

.timeline__project-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline__project-desc {
    font-size: 13.5px;
    color: var(--slate);
    line-height: 1.65;
    margin-bottom: 10px;
}

.timeline__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--slate);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
}

.tag--accent {
    color: var(--accent);
    background: var(--accent-light);
    border-color: rgba(81, 43, 212, .2);
}

/* ── COMPÉTENCES ─────────────────────────────────────────────── */
.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.skills__group {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 22px;
}

.skills__group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 16px;
}

.skills__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: var(--bg-alt);
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.skill-card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.skill-card--primary {
    background: var(--accent-light);
    border-color: rgba(81, 43, 212, .12);
}

.skill-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skill-card__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--navy);
    flex: 1;
}

.skill-card__level {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
}

/* ── FORMATION ───────────────────────────────────────────────── */
.edu__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.edu__card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 24px;
    border-left: 3px solid var(--accent);
    transition: box-shadow var(--transition);
}

.edu__card:hover {
    box-shadow: var(--shadow-hover);
}

.edu__year {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 10px;
}

.edu__degree {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
    margin-bottom: 6px;
}

.edu__school {
    font-size: 13px;
    font-weight: 500;
    color: var(--slate);
    margin-bottom: 10px;
}

.edu__desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

/* ── PORTFOLIO ───────────────────────────────────────────────── */
.portfolio__filters {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.portfolio__filter {
    font-size: 13px;
    font-weight: 500;
    color: var(--slate);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 20px;
    transition: all var(--transition);
}

.portfolio__filter:hover,
.portfolio__filter--active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio__item {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.portfolio__item.hidden {
    display: none;
}

.portfolio__img {
    position: relative;
    height: 200px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.portfolio__img--1 {
    background-image: url('../assets/portfolio/biospheralpes-mini.png');
    background-size: cover;
    background-position: center;
}

.portfolio__img--2 {
    background-image: url('../assets/portfolio/activyx.png');
    background-size: cover;
    background-position: center;
}

.portfolio__img--3 {
    background-image: url('../assets/portfolio/ordre_du_malt.png');
    background-size: cover;
    background-position: center;
}

.portfolio__img--4 {
    background-image: url('../assets/portfolio/days_before_christmas-mini.png');
    background-size: cover;
    background-position: center;
}

.portfolio__img--5 {
    background-image: url('../assets/portfolio/starwars.png');
    background-size: cover;
    background-position: center;
}

.portfolio__img--6 {
    background-image: url('../assets/portfolio/zombieiut.png');
    background-size: cover;
    background-position: center;
}

.portfolio__img--7 {
    background-color: #0f2942;
    background-image: url('../assets/portfolio/ouskier-mini.png');
    background-size: cover;
    background-position: center;
}

.portfolio__overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 46, .7);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 18px 20px;
    opacity: 0;
    transition: opacity var(--transition);
}

.portfolio__img:hover .portfolio__overlay {
    opacity: 1;
}

.portfolio__cat {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, .6);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 4px;
}

.portfolio__name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

/* ── CONTACT ─────────────────────────────────────────────────── */
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
    align-items: start;
}

.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--slate);
    margin-bottom: 16px;
}

.contact__item svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--accent);
}

.contact__item a {
    color: var(--accent);
}

.contact__item a:hover {
    text-decoration: underline;
}

.contact__socials {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.contact__social {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    border: 1px solid rgba(81, 43, 212, .25);
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.contact__social:hover {
    background: var(--accent);
    color: #fff;
}

/* Formulaire */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form__label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--slate);
}

.form__input {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--navy);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 13px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

.form__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(81, 43, 212, .12);
}

.form__input::placeholder {
    color: var(--muted);
}

.form__textarea {
    resize: vertical;
    min-height: 130px;
}

.form__status {
    font-size: 13.5px;
    font-weight: 500;
    padding: 0;
    border-radius: var(--radius);
    min-height: 0;
    transition: all var(--transition);
}

.form__status.success {
    color: #166534;
    background: #dcfce7;
    padding: 10px 14px;
}

.form__status.error {
    color: #991b1b;
    background: #fee2e2;
    padding: 10px 14px;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
    background: var(--navy);
    padding: 28px 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer__brand {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .5);
}

.footer__brand .nav__brand-bracket {
    color: rgba(81, 43, 212, .7);
}

.footer__copy {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .35);
}

.footer__top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--radius);
    color: rgba(255, 255, 255, .4);
    transition: all var(--transition);
}

.footer__top:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(81, 43, 212, .1);
}

/* ── Print ───────────────────────────────────────────────────── */
@media print {
    .nav, .hero__code-wrap, .hero__scroll, .hero__actions,
    .portfolio__filters, .contact__form, .footer__top {
        display: none;
    }

    .section {
        padding: 32px 0;
    }

    .hero {
        min-height: auto;
        padding: 24px 0;
    }

    a::after {
        content: ' (' attr(href) ')';
        font-size: 11px;
        color: var(--muted);
    }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero__code-wrap {
        display: none;
    }

    .about__grid {
        grid-template-columns: 1fr;
    }

    .about__photo-wrap {
        display: flex;
        justify-content: center;
    }

    .contact__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .section {
        padding: 64px 0;
    }

    .nav__menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px 20px;
        gap: 16px;
        transform: translateY(-110%);
        transition: transform var(--transition);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    }

    .nav__menu.open {
        transform: translateY(0);
    }

    .nav__burger {
        display: flex;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline__header {
        flex-direction: column;
    }

    .timeline__meta {
        align-items: flex-start;
    }

    .form__row {
        grid-template-columns: 1fr;
    }

    .footer__inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hero__stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .hero__stat-sep {
        display: none;
    }

    .hero__actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}

/* ── Modal portfolio ─────────────────────────────────────── */
.portfolio__item {
    cursor: pointer;
}

.portfolio__overlay::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, .15)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='1.5'%3E%3Ccircle cx='6.5' cy='6.5' r='4'/%3E%3Cpath d='M9.5 9.5L13 13'/%3E%3C/svg%3E")
        center / 16px no-repeat;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(4px);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.open {
    display: flex;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 10, 40, .75);
    backdrop-filter: blur(6px);
}

.modal__card {
    position: relative;
    z-index: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
    animation: modal-in .22s cubic-bezier(.4, 0, .2, 1);
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--slate);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.modal__close:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.modal__img-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--bg-alt);
}

.modal__img {
    width: 100%;
    height: auto;
    display: block;
}

.modal__body {
    padding: 1.5rem 1.75rem 1.75rem;
}

.modal__cat {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    display: block;
    margin-bottom: .5rem;
}

.modal__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .75rem;
}

.modal__desc {
    color: var(--slate);
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.modal__cta {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    text-decoration: none;
}

.modal__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1.1rem;
}

@media (max-width: 600px) {
    .modal__body { padding: 1.25rem; }
}
