:root {
  --font-primary: 'TASA Orbiter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-syllabics: 'Noto Sans Canadian Aboriginal', sans-serif;

  --color-background-main: #1d1d1f;
  --color-background-ui: #2c2c2e;
  --color-background-label: #222222;
  --color-background-gradient-1: #222222;
  --color-background-gradient-2: #252528;
  --color-background-gradient-3: #282525;
  --color-vignette: #121212;

  --color-text-primary: #f5f5f7;
  --color-text-secondary: #d2d2d7;
  --color-text-subtle: #86868b;
  /* CORRECTED: Fixed the typo causing the yellow tint */
  --color-dot-inactive: rgba(245, 245, 247, 0.4);

  --color-accent-yellow: #ffd60a;
  --color-accent-yellow-hover: #ffe033;
  --color-button-text: #1d1d1f;
}

html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-primary);
    background-color: var(--color-background-main);
    color: var(--color-text-primary);
    margin: 0;
    overflow: hidden; 
}

/* --- SUBTLE ANIMATED BACKGROUND --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    /* CHANGED: Replaced animated gradient with a static radial gradient */
    background: radial-gradient(ellipse at center, var(--color-background-gradient-2), var(--color-background-main));
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: 
        radial-gradient(ellipse at center, hsla(0,0%,0%,0) 0%, var(--color-vignette) 90%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 600 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-position: center;
    opacity: 0.12;
}
/* REMOVED: Deleted the @keyframes for the old animation */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  body::after { display: none; }
}
/* --- END OF BACKGROUND STYLES --- */

/* Main container for captive scrolling */
main {
    width: 100%;
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
main::-webkit-scrollbar {
    display: none;
}

/* Each full-screen section */
.scroll-section {
    height: 100dvh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 80px;
    box-sizing: border-box;
    position: relative;
}

.content-card, .left-text-card {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
    max-width: 1200px;
}

/* Generic styles for columns & content */
.image-column { flex: 1; max-width: 450px; }
.text-column { flex: 1.2; text-align: left; }
.hero-image { width: 100%; border-radius: 16px; display: block; }

/* === START OF SAFARI FIX === */
.image-container {
    width: 100%;
    aspect-ratio: 1.618 / 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.project-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
/* === END OF SAFARI FIX === */

.placeholder-image { 
    width: 100%; 
    background-color: transparent; 
}
.logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: auto;
    max-width: 250px;
}
h1 { font-size: 3.5rem; font-weight: 700; margin: 0 0 10px 0; font-variant-ligatures: common-ligatures; }
.syllabics { font-family: var(--font-syllabics); }
#home h3 { font-size: 1.5rem; font-weight: 400; color: var(--color-text-subtle); margin: 0 0 40px 0; line-height: 1.4; }
.project-card h3 { font-size: 1.2rem; font-weight: 400; color: var(--color-text-subtle); margin: 0 0 25px 0; line-height: 1.4; }
.left-text-card h2, .awards-text-content h2, .contact-card h2 { font-size: 2.8rem; font-weight: 600; margin-bottom: 20px;}
.project-card h2 { font-size: 2.8rem; font-weight: 600; margin-bottom: 15px; }
p { font-size: 1.15rem; line-height: 1.7; margin-bottom: 20px; color: var(--color-text-secondary); max-width: 70ch; text-align: justify; }

.project-card .image-column {
    flex: 1.5;
    max-width: 600px;
}
.project-card .text-column { 
    flex: 1;
}
.button-container { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 15px; }
.button { display: inline-block; background-color: var(--color-accent-yellow); color: var(--color-button-text); padding: 14px 28px; border-radius: 10px; text-decoration: none; font-size: 1.05rem; font-weight: 600; transition: all 0.3s ease; }
.button:hover { background-color: var(--color-accent-yellow-hover); transform: translateY(-3px); }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-accent-yellow);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- AWARDS CARD STYLES --- */
.awards-desktop-layout { gap: 80px; }
.awards-images {
    flex: 1.5;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.awards-images .grid-item {
    flex: 1;
    text-align: center;
}
.awards-text-content {
    flex: 1;
    text-align: left;
}
.award-badge { max-width: 100%; height: 160px; object-fit: contain; }
.mit-award-item .award-badge { transform: scale(1.15); }
.awards-images .grid-item h3 { font-size: 1.5rem; font-weight: 600; color: var(--color-text-primary); margin-top: 25px; margin-bottom: 0; }
.awards-text-content p { max-width: 100%; }

/* --- CONTACT CARD STYLES (UPDATED) --- */
.contact-card {
    text-align: left;
    max-width: 600px;
    width: 100%;
}
.contact-card p {
    text-align: left;
    max-width: 100%;
}
.contact-card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}
.form-field-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.form-field-with-icon {
    position: relative;
    width: 100%;
}
.form-field-with-icon .material-symbols-outlined {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    color: var(--color-text-subtle);
    pointer-events: none;
}
.form-input {
    background-color: var(--color-background-ui);
    color: var(--color-text-primary);
    border: 1px solid var(--color-dot-inactive);
    border-radius: 8px;
    padding: 14px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}
.form-field-with-icon .form-input {
    padding-left: 50px;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-accent-yellow);
}
.form-input::placeholder {
    color: var(--color-text-subtle);
}
textarea.form-input {
    min-height: 120px;
    resize: vertical;
}
.contact-card button {
    border: none;
    cursor: pointer;
    align-self: flex-start;
}
.button:disabled {
    background-color: var(--color-background-ui);
    color: var(--color-text-subtle);
    cursor: not-allowed;
    transform: none;
}
.button:disabled:hover {
    background-color: var(--color-background-ui);
    transform: none;
}
.error-message {
    color: var(--color-accent-yellow);
    font-size: 0.85rem;
    margin-top: 8px;
    padding-left: 5px;
}
.hidden {
    display: none;
}
#form-feedback {
    font-size: 1rem;
    font-weight: 600;
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}
#form-feedback.success {
    background-color: rgba(67, 160, 71, 0.2);
    color: #4CAF50;
}
#form-feedback.error {
    background-color: rgba(255, 214, 10, 0.15);
    color: var(--color-accent-yellow);
}


/* --- DOT NAVIGATION --- */
.dot-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    padding: 20px 10px;
    border-radius: 20px;
    cursor: pointer;
}
.dot-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-end;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease-in-out;
}
.dot-nav.is-visible ul,
.dot-nav:hover ul {
    opacity: 1;
    pointer-events: auto;
}
.dot-nav li { position: relative; }
.dot-nav li a {
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--color-dot-inactive);
    border-radius: 999px;
    transition: background-color 0.3s ease, height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), width 0.1s ease-out, transform 0.1s ease-out;
}
.dot-nav li a.active { background-color: var(--color-text-primary); height: 24px; }
.dot-label {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-primary);
    background-color: var(--color-background-label);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
.dot-nav:hover .dot-label { opacity: 1; }
.dot-nav li.is-closest > a {
    background-color: var(--color-accent-yellow);
}


/*
==================================================
--- UNIFIED MOBILE STYLES (REVISED) ---
==================================================
*/
@media (max-width: 900px) {
    /* --- GENERAL MOBILE LAYOUT --- */
    main { 
        overflow-y: auto; 
        scroll-snap-type: none;
    }
    .scroll-section {
        height: auto;
        min-height: 95dvh;
        padding: 60px 20px;
    }
    .content-card, .left-text-card, .contact-card, .awards-desktop-layout {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .image-column, .text-column, .awards-images, .awards-text-content {
        text-align: left;
        width: 100%;
        max-width: 500px;
    }
    .image-column, .awards-images {
        order: 1;
    }
    .text-column, .awards-text-content {
        order: 2;
    }
    .awards-images { 
        flex-direction: row; 
        gap: 20px; 
    }
    .awards-text-content { 
        margin-top: 0; 
    }

    /* --- FONT & ELEMENT SIZING --- */
    h1 { font-size: 2.5rem; }
    .left-text-card h2, .project-card h2, .awards-text-content h2, .contact-card h2 { font-size: 2rem; }
    #home h3, .project-card h3 { font-size: 1.2rem; }
    p { font-size: 1rem; }
    .button { padding: 10px 20px; font-size: 1rem; }
    .button-container { margin-top: 20px; }
    
    /* --- UNIVERSAL MOBILE CONTENT HIDING --- */
    #home .image-column { display: none; }
    .syllabics { display: none; }
    #home .text-column p:nth-of-type(2) { display: none; }
    #contact .contact-card p { display: none; }
    .awards-images .grid-item h3 { display: none; }

    /* --- DOT NAVIGATION HIDING --- */
    .dot-nav { right: 0; padding: 20px; cursor: default; }
    .dot-nav ul, .dot-nav:hover ul { opacity: 0; pointer-events: none; }
    .dot-label { display: none; }
    .dot-nav li a { pointer-events: none; }

    /* --- LANDSCAPE-SPECIFIC MODIFIER (NESTED) --- */
    @media (orientation: landscape) {
        .image-column,
        .awards-images {
            display: none;
        }
        .scroll-section {
            padding: 30px 40px;
        }
        .text-column,
        .awards-text-content {
            margin: 0 auto;
        }
    }
}