/* ===========================
   Variables
   =========================== */
:root {
    --bg:          #0d0d0f;
    --bg-2:        #111114;
    --bg-card:     #18181c;
    --border:      rgba(255, 255, 255, 0.07);
    --border-2:    rgba(255, 255, 255, 0.13);
    --text:        #e4ddd2;
    --text-muted:  #6e6560;
    --accent:      #c4703a;
    --accent-dim:  rgba(196, 112, 58, 0.14);

    --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --radius:    10px;
    --transition: 0.25s ease;
    --container: 1060px;
    --nav-h:     64px;
}

[data-theme="light"] {
    --bg:          #f0ebe1;
    --bg-2:        #e8e2d6;
    --bg-card:     #f8f3ea;
    --border:      rgba(80, 55, 25, 0.1);
    --border-2:    rgba(80, 55, 25, 0.2);
    --text:        #18120a;
    --text-muted:  #7a6e5e;
    --accent:      #a85e28;
    --accent-dim:  rgba(168, 94, 40, 0.1);
}

[data-theme="light"] .nav.scrolled {
    background: rgba(240, 235, 225, 0.88);
}

[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===========================
   Utilities
   =========================== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 15px;
    color: var(--text);
    transition: color var(--transition);
}

.link-arrow::after {
    content: '→';
    display: inline-block;
    transition: transform var(--transition);
}

.link-arrow:hover { color: var(--accent); }
.link-arrow:hover::after { transform: translateX(4px); }

.link-arrow--lg {
    font-size: 18px;
    font-weight: 600;
}

/* ===========================
   Navigation
   =========================== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    transition: background var(--transition), border-color var(--transition);
}

.nav.scrolled {
    background: rgba(13, 13, 15, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav__logo {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav__links a {
    padding: 5px 12px;
    border-radius: 7px;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition), background var(--transition);
}

.nav__links a:hover { color: var(--text); background: var(--border); }

.nav__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--border-2);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.icon-moon { display: none; }

.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav__burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ===========================
   Hero
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--nav-h) 0 80px;
}

.hero__content {
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.hero__meta {
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.hero__name {
    font-family: var(--font-head);
    font-size: clamp(72px, 13vw, 148px);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -4px;
    color: var(--text);
    margin-top: 4px;
}

.hero__rule {
    border: none;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, var(--accent), var(--border) 60%, transparent);
    margin: 8px 0;
}

.hero__role {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.hero__statement {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 560px;
}

.hero__links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.hero__chips span {
    padding: 4px 12px;
    border: 1px solid var(--border-2);
    border-radius: 6px;
    font-size: 13px;
    font-family: var(--font-head);
    font-weight: 500;
    color: var(--text-muted);
}

/* ===========================
   Sections
   =========================== */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-2); }

.section__header { margin-bottom: 48px; }

.section__title {
    font-family: var(--font-head);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text);
    line-height: 1.1;
}

/* ===========================
   Skills
   =========================== */
.skills__table {
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    overflow: hidden;
}

.skills__row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    align-items: start;
    transition: background var(--transition);
}

.skills__row:last-child { border-bottom: none; }
.skills__row:hover { background: var(--border); }

.skills__cat {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-top: 3px;
}

.skills__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skills__tags span {
    font-size: 14px;
    font-family: var(--font-head);
    font-weight: 500;
    color: var(--text);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: border-color var(--transition);
}

.skills__tags span:hover { border-color: var(--accent); }

.skills__row--more {
    padding: 14px 28px;
}

.skills__more {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

/* ===========================
   Timeline
   =========================== */
.timeline {
    position: relative;
    padding-left: 36px;
}

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

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

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

.timeline__marker {
    position: absolute;
    left: -33px;
    top: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid;
}

.marker--pro {
    background: var(--accent-dim);
    border-color: var(--accent);
}

.marker--edu {
    background: var(--bg-card);
    border-color: var(--border-2);
}

.timeline__card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: border-color var(--transition);
}

.timeline__card:hover { border-color: var(--border-2); }

.timeline__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.timeline__date {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.timeline__type {
    padding: 2px 9px;
    border-radius: 100px;
    font-size: 11px;
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.type--pro {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(196, 112, 58, 0.25);
}

.type--edu {
    background: var(--border);
    color: var(--text-muted);
    border: 1px solid var(--border-2);
}

.timeline__card h3 {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.timeline__company {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.timeline__card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ===========================
   Projects placeholder
   =========================== */
.projects__empty {
    padding: 48px 0;
    color: var(--text-muted);
    font-style: italic;
}

/* ===========================
   Projects
   =========================== */
.projects__group {
    margin-bottom: 56px;
}

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

.projects__group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.projects__company {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.projects__stack {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(196, 112, 58, 0.25);
    padding: 2px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.projects__period {
    font-family: var(--font-head);
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color var(--transition);
}

.project-card:hover { border-color: var(--border-2); }

.project-card h3 {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.project-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.project-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.project-card__link {
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    transition: opacity var(--transition);
    flex-shrink: 0;
}

.project-card__link:hover { opacity: 0.75; }

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

.project-card__tags span {
    font-size: 12px;
    font-family: var(--font-head);
    font-weight: 500;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--bg);
}

@media (max-width: 640px) {
    .projects__grid { grid-template-columns: 1fr; }
    .projects__period { display: none; }
}

/* ===========================
   Passions
   =========================== */
.passions__content {
    max-width: 700px;
}

.passions__text {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.passions__text p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.8;
}

.passions__text p:first-child {
    font-size: 17px;
    color: var(--text);
    font-style: italic;
}

.passions__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding-top: 36px;
    margin-top: 36px;
    border-top: 1px solid var(--border-2);
}

.passions__stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.passions__stat strong {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.5px;
}

.passions__stat span {
    font-size: 12px;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ===========================
   Contact
   =========================== */
.contact__content {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact__content p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-head);
}

/* ===========================
   Scroll reveal
   =========================== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    transition-delay: var(--delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .nav__links {
        display: none;
        position: fixed;
        inset: var(--nav-h) 0 0;
        background: rgba(13, 13, 15, 0.97);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        backdrop-filter: blur(16px);
    }

    [data-theme="light"] .nav__links {
        background: rgba(240, 235, 225, 0.97);
    }

    .nav__links.open { display: flex; }
    .nav__links.open a { font-size: 20px; padding: 12px 24px; }

    .nav__burger { display: flex; }
    .nav__burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav__burger.open span:nth-child(2) { opacity: 0; }
    .nav__burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .hero__name { letter-spacing: -3px; }

    .skills__row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .timeline { padding-left: 28px; }
    .timeline__marker { left: -25px; }

    .passions__stats { gap: 28px; }
}

@media (max-width: 480px) {
    .section { padding: 72px 0; }
    .hero__links { gap: 20px; }
    .passions__stat strong { font-size: 24px; }
}
