/* ==== Base Reset ==== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #1f2933;
    background: #f4f5f7;
}

/* ==== Layout Helpers ==== */
.container {
    width: min(1100px, 100% - 2rem);
    margin: 0 auto;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: #ffffff;
}

.section-title {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-intro {
    text-align: center;
    max-width: 650px;
    margin: 0.5rem auto 2.5rem;
    color: #5a6a7a;
}

/* ==== Header & Nav ==== */
.site-header {
    background: #0b1220;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #22c55e);
    font-size: 0.8rem;
}

.logo-text {
    font-size: 1.1rem;
}

/* Nav */
.main-nav .nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: #22c55e;
    transition: width 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 1.4rem;
    cursor: pointer;
}

/* ==== Hero ==== */
.hero {
    padding: 4rem 0 4.5rem;
    background: radial-gradient(circle at top left, #22c55e1a, transparent 55%),
                radial-gradient(circle at bottom right, #6366f11a, transparent 55%);
}

.hero-inner {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.hero-inner-page {
    padding: 3rem 0 2rem;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    margin-bottom: 1rem;
}

.hero h1 span {
    color: #6366f1;
}

.hero-subtitle {
    max-width: 600px;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #6366f1, #22c55e);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.3);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(15, 23, 42, 0.35);
}

.ghost-btn {
    border-color: #cbd5f5;
    color: #111827;
    background: #ffffff;
}

.ghost-btn:hover {
    background: #f9fafb;
}

/* Hero media */
.hero-media {
    text-align: center;
}

.hero-photo-frame {
    width: 260px;
    height: 260px;
    border-radius: 24px;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 4px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}

.hero-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-caption {
    font-size: 0.9rem;
    color: #6b7280;
}

/* ==== Cards & Grids ==== */
.grid {
    display: grid;
    gap: 1.5rem;
}

.three-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
    border: 1px solid #e5e7eb;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card p {
    font-size: 0.95rem;
    color: #4b5563;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.07);
    border-color: #cbd5f5;
}

/* Media grid */
.media-grid figure,
.portfolio-grid figure {
    margin: 0;
}

.media-grid img,
.media-grid video,
.portfolio-grid img,
.portfolio-grid video {
    border-radius: 14px;
    width: 100%;
    height: 190px;
    object-fit: cover;
    margin-bottom: 0.6rem;
}

.media-grid figcaption,
.portfolio-grid figcaption {
    font-size: 0.9rem;
    color: #4b5563;
}

/* About page layout */
.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
    gap: 2.5rem;
    align-items: start;
}

.about-photo img {
    width: 100%;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

.about-content h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.about-content p {
    margin-bottom: 0.9rem;
}

/* Timeline */
.timeline {
    list-style: none;
    margin: 1rem 0 1.5rem;
    border-left: 2px solid #d1d5db;
    padding-left: 1rem;
}

.timeline li {
    margin-bottom: 1rem;
    position: relative;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -10px;
    top: -.5rem;
    width: 690px;
    height: 5px;
    border-radius: 999px;
    background: #6366f1;
}

.timeline-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Chips (interests) */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #e0f2fe;
    font-size: 0.8rem;
    color: #0f172a;
}

/* Portfolio modal */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    z-index: 2000;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #ffffff;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

.modal-content h3 {
    margin-bottom: 0.5rem;
}

.modal-content p {
    font-size: 0.95rem;
    color: #4b5563;
}

.modal-close {
    position: absolute;
    right: 0.9rem;
    top: 0.7rem;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
}

/* ==== Footer ==== */
.site-footer {
    background: #0b1220;
    color: #9ca3af;
    padding: 1rem 0;
    margin-top: 3rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
}

/* Back to top button */
.back-to-top {
    border: none;
    background: #6366f1;
    color: #ffffff;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
}

/* ==== Responsive ==== */
@media (max-width: 900px) {
    .hero-inner,
    .about-layout {
        grid-template-columns: 1fr;
    }

    .hero-media {
        order: -1;
    }
}

@media (max-width: 768px) {
    .three-column {
        grid-template-columns: 1fr 1fr;
    }

    .nav-container {
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        right: 0;
        top: 100%;
        background: #020617;
        width: 220px;
        border-radius: 0 0 0 12px;
        box-shadow: 0 14px 26px rgba(0, 0, 0, 0.35);
        transform-origin: top right;
        transform: scaleY(0.8);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.15s ease, opacity 0.15s ease;
    }

    .nav-links {
        flex-direction: column;
        padding: 0.75rem 1rem 1rem;
    }

    .main-nav.open {
        transform: scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 560px) {
    .three-column {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
