:root {
    --bg: #0b0f16;
    --bg-soft: #121725;
    --bg-card: #171d2d;
    --bg-card-2: #1d2437;
    --text: #eef2f7;
    --muted: #99a4b7;
    --line: rgba(255, 255, 255, 0.09);
    --gold: #ecc57f;
    --blue: #8eb2ff;
    --shadow: 0 24px 60px rgba(2, 8, 20, 0.38);
    --radius: 20px;
    --shell: 1180px;
    --font-body: "DM Sans", sans-serif;
    --font-display: "Playfair Display", serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background:
        radial-gradient(circle at top right, rgba(142, 178, 255, 0.08), transparent 28%),
        radial-gradient(circle at top left, rgba(236, 197, 127, 0.06), transparent 28%),
        var(--bg);
    color: var(--text);
    line-height: 1.7;
}

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

a,
button {
    transition: 180ms ease;
}

button {
    font: inherit;
    cursor: pointer;
}

.shell {
    width: min(var(--shell), calc(100% - 2.4rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(18px);
    background: rgba(11, 15, 22, 0.84);
    border-bottom: 1px solid var(--line);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 78px;
}

.brand {
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.nav-links a,
.nav-cta {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links a:hover,
.nav-cta:hover {
    color: var(--gold);
}

.nav-cta {
    padding: 0.72rem 1rem;
    border: 1px solid rgba(236, 197, 127, 0.4);
    border-radius: 999px;
}

.hero {
    padding: 5.5rem 0 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 3.5rem;
    align-items: center;
}

.eyebrow,
.section-label {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.section-title,
.contact-panel h2,
.modal-body h3 {
    margin: 0;
    font-family: var(--font-display);
    line-height: 1.16;
}

.hero h1 {
    font-size: clamp(2.9rem, 6vw, 4.7rem);
    max-width: 12ch;
}

.hero h1 em {
    color: var(--gold);
    font-style: italic;
}

.hero-text {
    max-width: 60ch;
    margin: 1.5rem 0 2rem;
    color: var(--muted);
    font-size: 1.03rem;
}

.hero-actions,
.contact-actions,
.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.8rem 1.35rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #dca758);
    color: #0b0f16;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(220, 167, 88, 0.2);
}

.btn-secondary {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
    border-color: rgba(236, 197, 127, 0.45);
    color: var(--gold);
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.8rem;
}

.socials a {
    color: var(--blue);
    text-decoration: none;
}

.socials a:hover {
    color: var(--gold);
}

.hero-photo {
    position: relative;
}

.hero-frame {
    min-height: 520px;
    border-radius: 30px 10px 30px 10px;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.06));
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.photo-fallback {
    height: 100%;
    min-height: 520px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    background:
        radial-gradient(circle at top, rgba(142, 178, 255, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
}

.photo-fallback p,
.photo-fallback small {
    margin: 0.6rem 0 0;
}

.initials {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold);
    border: 1px solid rgba(236, 197, 127, 0.4);
    background: rgba(236, 197, 127, 0.08);
}

.status-chip {
    position: absolute;
    left: 50%;
    bottom: -16px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    background: rgba(23, 29, 45, 0.95);
    border: 1px solid var(--line);
    white-space: nowrap;
    color: var(--text);
    font-size: 0.84rem;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #63de91;
    box-shadow: 0 0 0 6px rgba(99, 222, 145, 0.12);
}

.section {
    padding: 5.5rem 0;
}

.section-alt {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    max-width: 14ch;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 430px);
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin: 0 0 1rem;
    color: var(--muted);
}

.skill-panel,
.contact-panel,
.info-card,
.project-card,
.cert-card,
.timeline-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
    box-shadow: var(--shadow);
}

.skill-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1.2rem;
    border-radius: var(--radius);
}

.skill-pill {
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.92rem;
}

.timeline {
    display: grid;
    gap: 1rem;
}

.timeline-card {
    display: flex;
    gap: 1rem;
    padding: 1.45rem;
    border-radius: var(--radius);
}

.timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 0.42rem;
    border-radius: 50%;
    background: var(--gold);
    flex: 0 0 auto;
}

.timeline-date,
.info-date,
.cert-org,
.modal-subtitle {
    color: var(--gold);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.timeline-card h3,
.info-card h3,
.project-card h3,
.cert-card h3 {
    margin: 0.2rem 0;
    font-size: 1.18rem;
}

.timeline-org,
.info-org {
    margin: 0 0 0.65rem;
    color: var(--blue);
}

.timeline-card p:last-child,
.info-card p:last-child,
.project-card p,
.cert-card p {
    color: var(--muted);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.cards-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.project-card,
.cert-card {
    overflow: hidden;
    border-radius: var(--radius);
}

.info-card img,
.project-card img,
.cert-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.info-body,
.project-body,
.cert-card > div {
    padding: 1.25rem;
}

.edu-brand {
    display: flex;
    align-items: center;
    min-height: 56px;
    margin-bottom: 0.75rem;
}

.edu-brand img {
    width: auto;
    max-width: 180px;
    max-height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(142, 178, 255, 0.14), transparent 55%),
        radial-gradient(circle at bottom left, rgba(236, 197, 127, 0.16), transparent 55%),
        var(--bg-card-2);
}

.project-thumb-placeholder i {
    width: 34px;
    height: 34px;
    color: var(--gold);
    stroke-width: 1.5;
}

.modal-visual .project-thumb-placeholder {
    aspect-ratio: auto;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(236, 197, 127, 0.35);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background: rgba(142, 178, 255, 0.1);
    color: #cad8ff;
}

.project-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.project-links a,
.text-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    background: none;
    border: 0;
    padding: 0;
}

.project-links a:hover,
.text-link:hover {
    color: var(--blue);
}

.cert-card {
    display: grid;
    grid-template-columns: 120px 1fr;
}

.cert-card img {
    height: 100%;
    aspect-ratio: auto;
}

.contact-panel {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 28px;
    text-align: center;
}

.contact-panel h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.contact-panel p {
    margin: 0 auto 1.7rem;
    max-width: 58ch;
    color: var(--muted);
}

.contact-actions {
    justify-content: center;
}

.site-footer {
    padding: 2rem 0 3rem;
    color: var(--muted);
    text-align: center;
}

.overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(4, 8, 16, 0.72);
    backdrop-filter: blur(8px);
    z-index: 120;
}

.overlay.open {
    display: flex;
}

.modal-card {
    position: relative;
    width: min(1100px, 100%);
    max-height: 92vh;
    overflow: auto;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #151b29, #101521);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.modal-project {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.modal-visual {
    min-height: 620px;
    background: #0f1420;
    border-right: 1px solid var(--line);
}

.modal-visual img,
.modal-visual iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.modal-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 620px;
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-size: 1rem;
}

.modal-body {
    padding: 2rem;
}

.modal-body h3 {
    font-size: 2rem;
    margin: 0.35rem 0 1rem;
}

.modal-description p {
    color: var(--muted);
    margin: 0 0 1rem;
}

.tag-row-modal {
    margin-top: 0;
}

.modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 1.5rem;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .hero-grid,
    .about-grid,
    .modal-project,
    .cards-grid,
    .cards-grid.two-up,
    .cards-grid.three-up {
        grid-template-columns: 1fr;
    }

    .hero-frame,
    .photo-fallback {
        min-height: 420px;
    }

    .modal-visual {
        min-height: 360px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        flex-wrap: wrap;
        justify-content: center;
        padding: 1rem 0;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding-top: 3rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .status-chip {
        position: static;
        transform: none;
        margin-top: 1rem;
        white-space: normal;
        justify-content: center;
    }

    .contact-panel,
    .modal-body {
        padding: 1.4rem;
    }

    .cert-card {
        grid-template-columns: 1fr;
    }

    .edu-brand {
        min-height: auto;
    }
}
