:root {
    --bg: #faf8f5;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --border: #e8e4df;
    --text: #1a1a1a;
    --text-muted: #555550;
    --text-dim: #8a8880;
    --accent: #e85d2f;
    --accent-soft: #fff0eb;
    --blue: #2d5be3;
    --blue-soft: #eef2ff;
    --green: #1a9960;
    --green-soft: #ecfdf5;
    --purple: #7c3aed;
    --purple-soft: #f3eeff;
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'DM Sans', -apple-system, sans-serif;
    --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --container: 1000px;
    --radius: 16px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Nav ─── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
    background: rgba(250, 248, 245, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--serif);
    font-size: 1.4rem;
    color: var(--text);
    text-decoration: none;
    background: var(--accent);
    color: white;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-style: italic;
    transition: transform 0.3s var(--ease), border-radius 0.3s;
}

.nav-logo:hover {
    transform: rotate(-5deg) scale(1.1);
    border-radius: 14px;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    transition: background 0.3s, color 0.3s;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-family: var(--serif);
    font-size: 2.2rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-menu a:hover {
    color: var(--accent);
}

/* ─── Hero ─── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem;
}

.hero-content {
    max-width: var(--container);
    width: 100%;
    text-align: center;
}

.hero-avatar {
    margin-bottom: 2rem;
}

.hero-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 4px solid var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s var(--ease), box-shadow 0.4s;
}

.hero-avatar img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.hero-label {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 10vw, 6.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-name {
    display: block;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.hero-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.hero-stack span {
    padding: 0.5rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.hero-stack span:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    border-radius: 2px;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.3; }
}

/* ─── Sections ─── */
.section {
    padding: 7rem 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.section-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.section-link:hover {
    opacity: 0.7;
}

/* ─── Tech ─── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.tech-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.tech-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.tech-category h3 {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-weight: 600;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech-tag {
    padding: 0.4rem 0.8rem;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s, transform 0.3s var(--ease);
}

.tech-tag:hover {
    background: var(--accent-soft);
    color: var(--accent);
    transform: scale(1.05);
}

/* ─── Timeline ─── */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

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

.timeline-item {
    position: relative;
    padding-bottom: 3.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
    transition: transform 0.3s var(--ease), background 0.3s;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    background: var(--accent);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.timeline-item:hover .timeline-content {
    transform: translateX(6px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
}

.timeline-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.timeline-company {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.timeline-role {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.timeline-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-details li {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 1.2rem;
    position: relative;
}

.timeline-details li::before {
    content: '~';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ─── Films ─── */
.films-block {
    margin-bottom: 3.5rem;
}

.films-block:last-child {
    margin-bottom: 0;
}

.films-subtitle {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.films-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.film-card {
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    transition: transform 0.4s var(--ease);
}

.film-card:hover {
    transform: translateY(-8px) rotate(-1deg);
}

.film-card:nth-child(even):hover {
    transform: translateY(-8px) rotate(1deg);
}

.film-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.4s var(--ease-smooth);
}

.film-card:hover .film-poster {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

.film-year {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.film-rating {
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: 0.5px;
}

/* ─── Books ─── */
.books-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}

.book-item:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border-color: var(--accent);
}

.book-cover {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.book-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.book-rating {
    margin-left: auto;
}

.book-title {
    font-family: var(--serif);
    font-size: 1.1rem;
}

.book-author {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.book-rating {
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─── Contact ─── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}

.contact-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
    transform: translateX(4px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.form-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 93, 47, 0.3);
}

/* ─── Footer ─── */
.footer {
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* ─── Reveal Animations ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}

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

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .tech-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .films-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .section {
        padding: 4.5rem 0;
    }
}

@media (max-width: 480px) {
    .films-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-marker {
        left: -2rem;
    }
}
