
:root {
    /* Palette */
    --bg:         #090d1a;
    --card:       rgba(15, 23, 42, 0.72);
    --gold:       #f0c040;
    --gold-dim:   rgba(240, 192, 64, 0.14);
    --gold-glow:  rgba(240, 192, 64, 0.32);
    --text:       #e8eaf0;
    --muted:      rgba(232, 234, 240, 0.52);
    --border:     rgba(240, 192, 64, 0.14);

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;
    --font-mono:    'Space Mono', 'Courier New', monospace;

    /* Spacing & shape */
    --radius:   16px;
    --radius-sm: 6px;
    --gap:      1.5rem;
    --section-pt: 6rem;

    /* Transitions */
    --t-fast:   0.2s ease;
    --t-base:   0.3s ease;
    --t-slow:   0.5s ease;
}

/* Light theme */
body.light {
    --bg:        #f2eadb;
    --card:      rgba(255, 252, 244, 0.96);

    --gold:      #6a4b00; 
    --gold-dim:  rgba(106, 75, 0, 0.14);
    --gold-glow: rgba(106, 75, 0, 0.28);

    --text:      #0b0a07;
    --muted:     rgba(11, 10, 7, 0.65); 
    --border:    rgba(106, 75, 0, 0.22); 
}


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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body { 
    font-family: var(--font-body); 
    line-height: 1.65;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background var(--t-base), color var(--t-base);
}

img   { display: block; max-width: 100%; }
ul    { list-style: none; }
a     { color: inherit; }
code  {
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: var(--gold);
}


/* ── PARTICLES ───────────────────────────────────────────── */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}


/* ── NAV       ──────────────────────────────────────────── */
header {
    position: sticky;
    top: 12px;
    z-index: 200;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

nav {
    background: rgba(9, 13, 26, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
}

body.light nav {
    background: rgba(244, 239, 228, 0.82);
}

nav ul {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

nav a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.42rem 0.85rem;
    border-radius: 30px;
    transition: color var(--t-fast), background var(--t-fast);
}

nav a:hover,
nav a:focus-visible {
    color: var(--gold);
    background: var(--gold-dim);
    outline: none;
}

nav a i { font-size: 0.95rem; }

#theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 0.4rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted);
    font-size:1rem;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

#theme-toggle:hover,
#theme-toggle:focus-visible {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
    outline: none;
}


/* ──  LAYOUT ──────────────────────────────────────────────── */
main {
    position: relative;
    z-index: 5;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 2rem 6rem;
}

section {
    padding-top: var(--section-pt);
    padding-bottom: 2rem;
}


.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.85;
    margin-bottom: 1.4rem;
}

.section-label::before {
    content: '';
    display: block;
    width: 26px;
    height: 1px;
    background: var(--gold);
    flex-shrink: 0;
}


.card-base {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}


/* ── ABOUT ───────────────────────────────────────────────── */
#about {
    min-height: 88vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 5rem;
    align-items: center;
}


.photo-wrap  { position: relative; }

.photo-frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    max-width: 340px;
}

.photo-frame::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--gold) 0%, transparent 55%, var(--gold-dim) 100%);
    z-index: 1;
}

.photo-frame img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 23px;
    filter: brightness(0.92) contrast(1.04);
    transition: transform var(--t-slow), filter var(--t-base);
}

.photo-frame:hover img {
    transform: scale(1.03);
    filter: brightness(1) contrast(1.04);
}


.photo-accent {
    position: absolute;
    bottom: -16px;
    right:  -16px;
    width:  80px;
    height: 80px;
    border-bottom: 2px solid var(--gold);
    border-right:  2px solid var(--gold);
    border-radius: 0 0 10px 0;
    opacity: 0.45;
}

/* About text */
.about-text h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    font-weight: 300;
    line-height: 1.12;
    margin-bottom: 0.4rem;
}

.about-text h1 em {
    font-style: italic;
    background: linear-gradient(90deg, var(--gold), #9c7802);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

.typed-line {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    font-weight: 300;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

#typed-word {
    color: var(--gold);
    font-style: italic;
    border-right: 2px solid var(--gold);
    padding-right: 3px;
    animation: blink 0.9s infinite;
    font-weight: 400;
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50%       { border-color: var(--gold); }
}

.about-bio {
    font-size: 1.10rem;
    color: var(--muted);
    max-width: 460px;
    margin-bottom: 1.8rem;
    line-height: 1.75;
}

/* Tech chips */
.stack-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0;
}

.chip {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--gold);
    background: var(--gold-dim);
    letter-spacing: 0.4px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    cursor: default; 

}

.chip:hover {
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold-glow);
}


.about-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.btn-primary,
.btn-outline { 
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.83rem;
    padding: 0.72rem 1.55rem;
    border-radius: 50px;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: box-shadow var(--t-fast), 
        transform var(--t-fast), 
        background var(--t-fast), 
        border-color var(--t-fast);
}

.btn-primary {
    background: var(--gold);
    color: var(--bg);
    border: 1px solid var(--gold);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    box-shadow: 0 0 22px var(--gold-glow);
    transform: translateY(-2px);
    outline: none;
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--border);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    border-color: var(--gold);
    background: var(--gold-dim);
    transform: translateY(-2px);
    outline: none;
}


/* ──  EDUCATION ───────────────────────────────────────────── */
.education-card { 
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.4rem;
    transition: border-color var(--t-base), 
        box-shadow var(--t-base), 
        transform var(--t-base);
}

.education-card:hover {
    border-color: rgba(240, 192, 64, 0.38);
    box-shadow: 0 20px 48px rgba(0,0,0,0.45), 0 0 28px rgba(240,192,64,0.06);
    transform: translateY(-4px);
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.edu-header h2 {
    font-family: var(--font-display);
    font-size: 1.70rem;
    font-weight: 600;
    color: var(--text);
}

.edu-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--gold);
    background: var(--gold-dim);
    white-space: nowrap;
}

.program {
    font-size: 1rem;
    color: var(--muted);
    margin-top: 0.3rem;
    margin-bottom: 1.3rem;
}

.coursework {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 2rem;  
}

.coursework li {
    flex: 0 0 calc(50% - 1rem);  
    font-size: 0.95rem;
    color: var(--muted);
    padding-left: 1.1rem;
    position: relative;
}

.coursework li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--gold);
}


/* ──  PROJECTS ────────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
}

.proj-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: border-color var(--t-base), 
        transform var(--t-base), 
        box-shadow var(--t-base);
}


.proj-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity var(--t-base);
}

.proj-card:hover {
    border-color: rgba(240, 192, 64, 0.28);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.38), 0 0 18px rgba(240,192,64,0.05);
}

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

/* Project image */
.proj-img {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-img img {
    width: 92%;
    height: 92%;
    object-fit: contain;
    transition: transform 0.25s ease;
}


.proj-img-placeholder { font-size: 2.2rem; opacity: 0.28; }



.proj-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.proj-desc {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.72;
    flex: 1;
}

/* Tags */
    .proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.22rem 0.55rem;
    border-radius: var(--radius-sm);
    background: var(--gold-dim);
    border: 1px solid rgba(240,192,64,0.2);
    color: var(--gold);
    letter-spacing: 0.3px;
}

/* Links */
.proj-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.proj-link {
    display: inline-flex;
    align-items: center;
    gap: 0.50rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color var(--t-fast);
}

.proj-link:hover,
.proj-link:focus-visible {
    color: var(--gold);
    outline: none;
}

.proj-link i { font-size: 0.85rem; }


/* ──  EXPERIENCE ──────────────────────────────────────────── */
.exp-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.exp-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 2rem;
    align-items: start;
    transition: border-color var(--t-base), transform var(--t-base);
}

.exp-card:hover {
    border-color: rgba(240, 192, 64, 0.28);
    transform: translateX(4px);
}

.exp-meta {
    border-right: 1px solid var(--border);
    padding-right: 2rem;
}

.exp-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gold);
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
}

.exp-company {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.exp-role {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

.exp-bullets {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.exp-bullets li {
    font-size: 0.95rem;
    color: var(--muted);
    padding-left: 1.1rem;
    position: relative;
    line-height: 1.65;
}

.exp-bullets li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--gold);
}

/* CV download card */
.exp-card--cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    text-align: center;
    padding: 2rem;
    grid-template-columns: 1fr;  
}

.exp-cta-text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--muted);
}


/* ──  FOOTER / CONTACT ───────────────────────────────────── */
footer {
    position: relative;
    z-index: 5;
    border-top: 1px solid var(--border);
    padding: 4rem 2rem 2.5rem;
    text-align: center;
}

.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 300;
    font-style: italic;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.contact-sub {
    font-size: 0.90rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
}

 
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    max-width: 860px;
    margin: 0 auto 2.5rem;
    text-align: left;
}

/* Left column */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-top: 0.4rem;
}

.contact-info-label {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.75;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    font-size: 1.5rem;
    transition: color var(--t-fast), 
        border-color var(--t-fast), 
        box-shadow var(--t-fast), 
        transform var(--t-fast);
}

.social-links a:hover,
.social-links a:focus-visible {
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 14px var(--gold-glow);
    transform: translateY(-3px);
    outline: none;
} 
 
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.8;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
    resize: vertical;
    transition: border-color var(--t-fast),box-shadow var(--t-fast);
}

body.light .form-group input,
body.light .form-group textarea {
    background: rgba(255, 253, 245, 0.7);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(240, 192, 64, 0.5);
    box-shadow: 0 0 0 3px rgba(240, 192, 64, 0.08);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: rgba(255, 90, 90, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 90, 90, 0.07);
}

.form-submit { align-self: flex-start; }

.form-status {
    font-size: 0.8rem;
    min-height: 1.2em;
    transition: color var(--t-fast);
}

    .form-status.success { color: #097534; }
    .form-status.error   { color: #ff8a8a; }

.copyright {
    font-size: 0.95rem;
    color: var(--muted);
    opacity: 0.45;
}
 

/* ──  SCROLL REVEAL ──────────────────────────────────────── */
.reveal {
opacity: 0;
transform: translateY(22px);
transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
opacity: 1;
transform: none;
}


/* ──  modal ──────────────────────────────────────── */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);

    justify-content: center;
    align-items: center;
}

/* Modal image */
.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
}

/* Close button */
.modal-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 36px;
    color: white;
    cursor: pointer;
    user-select: none;
}