:root {
    
    --bg:           #0b0f14;
    --bg-mid:       #0f1520;
    --surface:      #131c28;
    --surface-hi:   #1a2535;

    /* Borders */
    --border:       rgba(255, 255, 255, 0.06);
    --border-hi:    rgba(32, 220, 180, 0.30);

    /* Text */
    --fg:           #ddeaf5;          
    --muted:        #4d6880;          
    --muted-hi:     #7ea0bc;          

    /* Teal accent family */
    --accent:       #20dbb4;          
    --accent-soft:  #5eecd0;          
    --accent-dim:   rgba(32, 219, 180, 0.12);
    --accent-glow:  rgba(32, 219, 180, 0.06);

    /* Typography */
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans:  'DM Sans', sans-serif;
    --mono:  'DM Mono', monospace;
}

#bg-video{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
object-fit:cover;
z-index:-1;
filter:brightness(0.35);
}

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

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

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
}

/* ── NOISE GRAIN ─────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.028;
    pointer-events: none;
    z-index: 9999;
}

/* ── ANIMATED BG ORBS ────────────────────────────────── */
.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    animation: drift 22s ease-in-out infinite alternate;
}

/* Teal orb — top right */
.orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(32, 219, 180, 0.09) 0%, transparent 70%);
    top: -250px;
    right: -150px;
    animation-duration: 20s;
}

/* Deep blue orb — bottom left */
.orb-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(15, 60, 120, 0.18) 0%, transparent 70%);
    bottom: -100px;
    left: -200px;
    animation-duration: 28s;
    animation-delay: -10s;
}

/* Faint teal — mid center */
.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(32, 219, 180, 0.05) 0%, transparent 70%);
    top: 40%;
    left: 35%;
    animation-duration: 34s;
    animation-delay: -16s;
}

@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(50px, -40px) scale(1.07); }
    66%  { transform: translate(-30px, 60px) scale(0.93); }
    100% { transform: translate(35px, 25px) scale(1.03); }
}

/* ── HEADER ──────────────────────────────────────────── */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 26px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(11, 15, 20, 0.90);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--fg);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover { opacity: 0.7; }

.logo span {
    color: var(--accent);
    font-style: italic;
}

nav {
    display: flex;
    gap: 36px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--mono);
    position: relative;
    padding-bottom: 3px;
    transition: color 0.35s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

nav a:hover { color: var(--accent-soft); }
nav a:hover::after { width: 100%; }



@keyframes fadeUp {
    from { opacity: 0; transform: translateY(50px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes skillSlide {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@supports (animation-timeline: scroll()) {

    .scroll-fade-up {
        animation: fadeUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
        animation-delay: var(--sd, 0s);
    }

    .scroll-slide-left {
        animation: fadeInLeft 0.9s cubic-bezier(0.23, 1, 0.32, 1) both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
        animation-delay: var(--sd, 0s);
    }

    .scroll-slide-right {
        animation: fadeInRight 0.9s cubic-bezier(0.23, 1, 0.32, 1) both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
        animation-delay: var(--sd, 0s);
    }

    .scroll-card {
        animation: scaleIn 0.85s cubic-bezier(0.23, 1, 0.32, 1) both;
        animation-timeline: view();
        animation-range: entry 0% entry 40%;
        animation-delay: var(--sd, 0s);
    }

    .scroll-skill {
        animation: skillSlide 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
        animation-timeline: view();
        animation-range: entry 0% entry 30%;
        animation-delay: var(--sd, 0s);
    }
}

/* ── HERO PAGE-LOAD ANIMATIONS ───────────────────────── */

@keyframes heroReveal {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-reveal-1 { animation: heroReveal 0.9s cubic-bezier(0.23,1,0.32,1) 0.10s both; }
.hero-reveal-2 { animation: heroReveal 0.9s cubic-bezier(0.23,1,0.32,1) 0.25s both; }
.hero-reveal-3 { animation: heroReveal 0.9s cubic-bezier(0.23,1,0.32,1) 0.40s both; }
.hero-reveal-4 { animation: heroReveal 0.9s cubic-bezier(0.23,1,0.32,1) 0.55s both; }
.hero-reveal-5 { animation: heroReveal 0.9s cubic-bezier(0.23,1,0.32,1) 0.70s both; }

/* ── HERO SECTION ────────────────────────────────────── */

#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 8%;
    position: relative;
    z-index: 1;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
    width: 100%;
    padding-top: 90px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
}

.eyebrow::before {
    content: '';
    display: block;
    width: 32px; height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero-name {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.hero-name em {
    font-style: italic;
    color: var(--accent);
}

.hero-tagline {
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 36px;
    text-transform: uppercase;
}

.hero-desc {
    color: var(--muted-hi);
    max-width: 440px;
    font-size: 0.95rem;
    margin-bottom: 48px;
    line-height: 1.85;
}

.btn-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

/* ── BUTTONS ─────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 36px;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--accent);
    color: var(--bg);
    background: var(--accent);
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, back-ground 0.4s ease;
}

/* Teal-to-transparent wipe on primary btn hover */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-soft);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
}

.btn span, .btn { position: relative; z-index: 1; }
.btn:hover::before { transform: scaleX(1); }

.btn-ghost {
    background: transparent;
    border-color: var(--border-hi);
    color: var(--accent);
}

.btn-ghost::before { background: var(--accent-dim); }
.btn-ghost:hover { color: var(--accent-soft); border-color: var(--accent); }

/* ── PHOTO FRAME ─────────────────────────────────────── */

.photo-frame {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Animated teal glow border */
.photo-frame::before {
    content: '';
    position: absolute;
    inset: -14px;
    border: 1px solid rgba(32, 219, 180, 0.15);
    z-index: 0;
    animation: framePulse 5s ease-in-out infinite alternate;
}

/* Second decorative offset border */
.photo-frame::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px solid rgba(32, 219, 180, 0.08);
    z-index: 0;
}

@keyframes framePulse {
    from {
        border-color: rgba(32, 219, 180, 0.08);
        transform: translate(0, 0);
    }
    to {
        border-color: rgba(32, 219, 180, 0.28);
        transform: translate(10px, 10px);
    }
}

.photo-frame img {
    width: 100%;
    max-width: 360px;
    height: 460px;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    filter: grayscale(20%) contrast(1.05);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.photo-frame img:hover {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.015);
}

.hero-number {
    position: absolute;
    bottom: 6%;
    right: 6%;
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 300;
    color: rgba(32, 219, 180, 0.03);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* ── SECTION SHELL ───────────────────────────────────── */

section {
    position: relative;
    z-index: 1;
    padding: 130px 8%;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}

.section-label::before {
    content: '';
    width: 28px; height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 64px;
}

.section-title em {
    font-style: italic;
    color: var(--accent);
}

/* ── DIVIDERS ────────────────────────────────────────── */

#about, #projects, #skills, #contact {
    border-top: 1px solid var(--border);
}

/* ── ABOUT ───────────────────────────────────────────── */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: start;
}

.about-left {
    display: flex;
    flex-direction: column;
}

.about-stat {
    display: flex;
    flex-direction: column;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* Teal left accent bar on hover */
.about-stat::before {
    content: '';
    position: absolute;
    left: -8px; top: 0; bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.about-stat:hover::before { transform: scaleY(1); }
.about-stat:first-child { padding-top: 0; }
.about-stat:last-child  { border-bottom: none; }

.stat-number {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent);
    line-height: 1;
    transition: color 0.3s ease;
}

.about-stat:hover .stat-number { color: var(--accent-soft); }

.stat-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 8px;
}

.about-text {
    font-size: 1rem;
    color: var(--muted-hi);
    line-height: 1.95;
}

.about-text p + p { margin-top: 1.4em; }

/* ── PROJECTS ────────────────────────────────────────── */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.project-card {
    background: var(--surface);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: back-ground 0.4s ease;
}

.project-card:hover { background: var(--surface-hi); }

/* Teal gradient overlay */
.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.project-card:hover::before { opacity: 1; }

/* Teal top border reveal on hover */
.project-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}

.project-card:hover::after { transform: scaleX(1); }

.project-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    cursor: pointer;
    background-color: var(--bg-mid);
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card a:has(.project-img) {
    display: block;
    overflow: hidden;
    position: relative;
    z-index: 3;
}

.project-body {
    padding: 32px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 2;
}

.project-index {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 12px;
}

.project-card h3 {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.project-card:hover h3 { color: var(--accent-soft); }

.project-card p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-dim);
    padding-bottom: 4px;
    transition: color 0.3s ease, border-color 0.3s ease, gap 0.3s ease;
}

.project-link:hover {
    color: var(--accent-soft);
    border-color: var(--accent);
    gap: 16px;
}

/* ── SKILLS ──────────────────────────────────────────── */

.skills-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: start;
}

.skills-intro p {
    color: var(--muted-hi);
    font-size: 0.93rem;
    line-height: 1.85;
}

.skills-list {
    display: flex;
    flex-direction: column;
}

.skill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: back-ground 0.4s ease;
}

.skill-row:first-child { border-top: 1px solid var(--border); }

/* Teal sweep fill */
.skill-row::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: var(--accent-dim);
    transition: width 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.skill-row:hover::before { width: 100%; }

/* Left teal bar */
.skill-row::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.skill-row:hover::after { transform: scaleY(1); }

.skill-name {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.skill-cat {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.skill-row:hover .skill-name { color: var(--accent); }
.skill-row:hover .skill-cat  { color: var(--accent-soft); }

/* ── CONTACT ─────────────────────────────────────────── */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-intro p {
    color: var(--muted-hi);
    font-size: 1rem;
    line-height: 1.85;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-item {
    padding: 28px 24px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease;
    background: var(--surface);
}

/* Teal bottom border grow */
.contact-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Teal glow from bottom */
.contact-item::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0;
    background: linear-gradient(to top, var(--accent-glow), transparent);
    transition: height 0.5s ease;
}

.contact-item:hover { border-color: var(--border-hi); }
.contact-item:hover::after  { transform: scaleX(1); }
.contact-item:hover::before { height: 100%; }

.contact-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

.contact-item p,
.contact-item a {
    color: var(--fg);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
    position: relative;
    z-index: 1;
}

.contact-item a:hover { color: var(--accent); }

/* ── FOOTER ──────────────────────────────────────────── */

footer {
    position: relative;
    z-index: 1;
    padding: 40px 8%;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--bg-mid);
}

.footer-copy {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--muted);
}


/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar       { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ── SELECTION ───────────────────────────────────────── */
::selection { background: var(--accent); color: var(--bg); }


@media (max-width: 1024px) {

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
        padding-top: 110px;
    }

    .eyebrow     { justify-content: center; }
    .hero-desc   { margin-inline: auto; }
    .btn-row     { justify-content: center; }
    .photo-frame { justify-content: center; }

    .photo-frame img {
        max-width: 300px;
        height: 380px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-left {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .about-stat {
        padding-top: 0;
        border-bottom: none;
        border-right: 1px solid var(--border);
        padding-right: 20px;
    }

    .about-stat:last-child { border-right: none; }

    .projects-grid  { grid-template-columns: 1fr; }
    .skills-layout  { grid-template-columns: 1fr; gap: 32px; }
    .contact-layout { grid-template-columns: 1fr; gap: 40px; }

    nav { display: none; }
}

@media (max-width: 600px) {

    section { padding: 80px 6%; }
    header  { padding: 22px 6%; }

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

    .about-left {
        grid-template-columns: 1fr 1fr;
    }

    .about-stat:last-child {
        grid-column: span 2;
        border-right: none;
        border-top: 1px solid var(--border);
        padding-top: 20px;
    }
    #bg-video{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    object-fit:cover;
    z-index:-1;
    filter:brightness(0.35);
}

}