/* ── Tokens ─────────────────────────────────────────────── */
:root {
    --ink:    #111318;
    --accent: #c0392b;
    --accent2:#e74c3c;
    --muted:  #6b7280;
    --rule:   #e5e7eb;
    --bg:     #fafaf8;
    --card:   #ffffff;
    --nav-h:  60px;
    --font-sans: "DM Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-serif: "DM Serif Display", Georgia, "Times New Roman", serif;
}

/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Nav ────────────────────────────────────────────────── */
.nav-wrap {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(17,19,24,0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    height: var(--nav-h);
    display: flex; align-items: center;
}
.nav-inner {
    width: 100%; max-width: 1140px; margin: 0 auto;
    padding: 0 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: 0.01em;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    font-size: 0.83rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.22);
    background: transparent;
    color: #fff;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger::before {
    transform: translateY(-6px);
}

.hamburger::after {
    transform: translateY(4px);
}

.nav-toggle.active .hamburger {
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::before {
    transform: translateY(0);
    opacity: 0;
}

.nav-toggle.active .hamburger::after {
    transform: translateY(-2px) rotate(-90deg);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    margin-top: var(--nav-h);
    background: var(--ink);
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative; overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: -120px; right: -100px;
    width: 480px; height: 480px; border-radius: 50%;
    background: var(--accent); opacity: 0.07;
}
.hero::after {
    content: '';
    position: absolute; bottom: -80px; left: 20%;
    width: 260px; height: 260px; border-radius: 50%;
    background: var(--accent2); opacity: 0.04;
}
.hero-inner {
    max-width: 1140px; margin: 0 auto; padding: 0 1.5rem;
    display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center;
}
.hero-eyebrow {
    font-size: 0.75rem; font-weight: 500;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--accent2); margin-bottom: 0.9rem;
}
.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-weight: 400; line-height: 1.1;
    margin-bottom: 1rem;
}
.hero-sub {
    font-size: 1.05rem; font-weight: 300;
    color: rgba(255,255,255,0.6);
    margin-bottom: 2rem; max-width: 42ch;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
    background: var(--accent); color: #fff;
    padding: 0.65rem 1.6rem; border-radius: 2px;
    font-size: 0.85rem; font-weight: 600;
    letter-spacing: 0.04em; border: 2px solid var(--accent);
    transition: all 0.2s; cursor: pointer;
}
.btn-primary:hover { background: transparent; }
.btn-outline {
    background: transparent; color: rgba(255,255,255,0.7);
    padding: 0.65rem 1.6rem; border-radius: 2px;
    font-size: 0.85rem; font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.7); color: #fff; }
.hero-stats {
    display: flex; gap: 2rem; margin-top: 3rem;
    padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stats > div {
    text-align: center;
}
.stat-n {
    font-family: var(--font-serif);
    font-size: 2.2rem; color: var(--accent2); line-height: 1;
}
.stat-l { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-top: 0.25rem; }
.hero-photo {
    width: 264px; height: 264px; border-radius: 50%;
    object-fit: cover; object-position: top;
    border: 3px solid rgba(255,255,255,0.08);
    position: relative; z-index: 1;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* ── Section base ───────────────────────────────────────── */
section { scroll-margin-top: var(--nav-h); }
.section-wrap { max-width: 1140px; margin: 0 auto; padding: 5rem 1.5rem; }
.section-label {
    font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 0.5rem;
}
.section-h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 400; color: var(--ink);
    margin-bottom: 3rem;
}

/* ── About ──────────────────────────────────────────────── */
#about { background: #fff; }
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
.about-text p { color: #374151; margin-bottom: 1rem; font-size: 0.97rem; }
.skills-block h3 {
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 0.85rem;
}
.pill-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }
.pill {
    font-size: 0.8rem; font-weight: 500; padding: 0.3rem 0.8rem;
    border-radius: 2px; border: 1px solid var(--rule);
    background: var(--bg); color: var(--ink);
    border-left: 3px solid var(--accent);
}

/* ── Portfolio ──────────────────────────────────────────── */
#portfolio { background: #8b8a8a; }
#portfolio .section-label {
    color: #ffe2db;
}
#portfolio .section-h2 {
    color: #fff;
}
.portfolio-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.p-card {
    background: var(--card); border: 1px solid var(--rule);
    border-top: 3px solid var(--accent);
    padding: 1.8rem; border-radius: 2px;
    transition: transform 0.25s, box-shadow 0.25s;
}
.p-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.09); }
.p-card-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(192,57,43,0.08);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.2rem; font-size: 1.1rem;
}
.p-card h3 { font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; }
.p-card p { font-size: 0.87rem; color: #4b5563; line-height: 1.55; margin-bottom: 1rem; }
.p-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.p-tag {
    font-size: 0.7rem; padding: 0.15rem 0.55rem;
    border-radius: 2px; background: #f3f4f6;
    border: 1px solid var(--rule); color: #374151; font-weight: 500;
}

/* ── CV Section (preserved & polished) ─────────────────── */
#cv { background: var(--bg); }
.cv-header {
    background: var(--ink); color: #fff;
    padding: 4rem 0 3rem; position: relative; overflow: hidden;
}
.cv-header::before {
    content: ''; position: absolute; top: -60px; right: -80px;
    width: 320px; height: 320px; border-radius: 50%;
    background: var(--accent); opacity: 0.08;
}
.cv-header .cv-name {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 400; margin-bottom: 0.25rem;
}
.cv-title-line {
    font-size: 1rem; font-weight: 300;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(255,255,255,0.55); margin-bottom: 1.5rem;
}
.cv-contact-row {
    display: flex; flex-wrap: wrap; gap: 1.25rem;
    font-size: 0.85rem; color: rgba(255,255,255,0.7);
}
.cv-contact-row a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.cv-contact-row a:hover { color: #fff; }
.contact-item { display: flex; align-items: center; gap: 0.4rem; }
.contact-icon { opacity: 0.5; font-size: 0.8rem; }
.cv-body { padding: 3rem 0 4rem; }
.section-title {
    font-family: var(--font-serif);
    font-size: 1.25rem; font-weight: 400; color: var(--ink);
    margin-bottom: 1.4rem; padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: flex; align-items: center; gap: 0.6rem;
}
.section-title .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); flex-shrink: 0;
}
.exp-item {
    margin-bottom: 1.75rem; padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--rule);
}
.exp-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.exp-header {
    display: flex; justify-content: space-between;
    align-items: baseline; flex-wrap: wrap;
    gap: 0.2rem; margin-bottom: 0.1rem;
}
.exp-title { font-weight: 600; font-size: 0.98rem; }
.exp-period { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.exp-company {
    font-size: 0.85rem; color: var(--accent);
    font-weight: 500; margin-bottom: 0.55rem; font-style: italic;
}
.exp-desc { color: #374151; font-size: 0.88rem; margin: 0; padding: 0; list-style: none; }
.exp-desc li { position: relative; padding-left: 1rem; margin-bottom: 0.3rem; }
.exp-desc li::before { content: '–'; position: absolute; left: 0; color: var(--accent); }
.exp-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.65rem; }
.tag {
    background: #f3f4f6; color: #374151;
    font-size: 0.73rem; padding: 0.18rem 0.6rem;
    border-radius: 2px; font-weight: 500; border: 1px solid var(--rule);
}
.edu-item {
    display: grid; grid-template-columns: 1fr auto;
    gap: 0.25rem 1rem; align-items: start;
    padding: 0.7rem 0; border-bottom: 1px solid var(--rule);
}
.edu-item:last-child { border-bottom: none; }
.edu-degree { font-weight: 600; font-size: 0.92rem; }
.edu-school { font-size: 0.82rem; color: var(--muted); }
.edu-year { font-size: 0.78rem; color: var(--muted); text-align: right; white-space: nowrap; padding-top: 0.15rem; }
.role-item {
    display: flex; justify-content: space-between;
    align-items: baseline; flex-wrap: wrap;
    gap: 0.25rem; padding: 0.5rem 0;
    border-bottom: 1px solid var(--rule); font-size: 0.88rem;
}
.role-item:last-child { border-bottom: none; }
.role-period { font-size: 0.78rem; color: var(--muted); }
.side-card {
    background: var(--card); border: 1px solid var(--rule);
    border-top: 3px solid var(--accent);
    padding: 1.3rem; margin-bottom: 1.4rem; border-radius: 2px;
}
.side-card h3 {
    font-family: var(--font-serif);
    font-size: 1rem; font-weight: 400;
    margin-bottom: 0.9rem; color: var(--ink);
}
.stat-row { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.55rem; }
.stat-num { font-family: var(--font-serif); font-size: 1.7rem; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.79rem; color: var(--muted); line-height: 1.3; }
.lang-item {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.88rem; padding: 0.35rem 0;
    border-bottom: 1px solid var(--rule);
}
.lang-item:last-child { border-bottom: none; }
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.skill-pill {
    background: #f9fafb; border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    padding: 0.38rem 0.65rem; font-size: 0.78rem;
    font-weight: 500; color: var(--ink); border-radius: 2px; line-height: 1.3;
}
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
    display: flex; justify-content: space-between;
    font-size: 0.85rem; padding: 0.3rem 0;
    border-bottom: 1px solid var(--rule);
}
.info-list li:last-child { border-bottom: none; }
.info-list .label { color: var(--muted); }

/* ── Contact ────────────────────────────────────────────── */
#contact { background: #fff; }
.contact-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
.contact-info p { color: #4b5563; font-size: 0.95rem; margin-bottom: 1.5rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link-item {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.9rem; color: var(--ink);
    padding: 0.6rem 0; border-bottom: 1px solid var(--rule);
}
.contact-link-item span:first-child { opacity: 0.5; }
.contact-link-item a { color: var(--ink); }
.contact-link-item a:hover { color: var(--accent); }
.form-group { margin-bottom: 1.2rem; }
.form-label {
    display: block; font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 0.4rem;
}
.form-input {
    width: 100%; padding: 0.65rem 0.9rem;
    border: 1px solid var(--rule); border-radius: 2px;
    font-family: inherit; font-size: 0.92rem; color: var(--ink);
    background: var(--bg); transition: border-color 0.2s;
    outline: none;
}
.form-input:focus { border-color: var(--accent); }
textarea.form-input { resize: vertical; min-height: 120px; }
.btn-submit {
    background: var(--accent); color: #fff;
    padding: 0.7rem 2rem; border: none; border-radius: 2px;
    font-family: inherit; font-size: 0.88rem; font-weight: 600;
    letter-spacing: 0.05em; cursor: pointer; transition: all 0.2s;
}
.btn-submit:hover { background: #a93226; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
    background: var(--ink); color: rgba(255,255,255,0.82);
    text-align: center; padding: 2rem;
    font-size: 0.82rem;
}
footer a {
    color: #ffffff;
    margin-left: 0.5rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}
footer a:hover { color: #ffe8e3; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-photo {
        display: block;
        width: 200px;
        height: 200px;
        margin: 1rem auto 0;
    }
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .nav-toggle { display: inline-flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: rgba(17,19,24,0.98);
        border-bottom: 1px solid rgba(255,255,255,0.08);
        flex-direction: column;
        gap: 0;
        padding: 0.6rem 1.5rem 0.8rem;
    }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .nav-links li:last-child a { border-bottom: 0; }
}
@media (max-width: 600px) {
    .portfolio-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 1.2rem; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.2rem;
    }

    #about .col-md-6 {
        margin-top: 2rem;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.6s ease-in;
}
