:root {
    --bg-primary: #08080a;
    --bg-secondary: #0f0f13;
    --bg-glass: rgba(15, 15, 19, 0.7);
    --bg-glass-heavy: rgba(15, 15, 19, 0.9);
    --text-primary: #f8f8f8;
    --text-secondary: #9ea1ab;
    --accent: #00e5ff;
    --accent-hover: #00b3cc;
    --border: rgba(255, 255, 255, 0.08);
    --font-main: 'Inter', system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 0;
    /* for mobile nav if applicable, handled in queries */
}

/* Background animated FX */
.bg-fx {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.03) 0%, transparent 60%),
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-spacing {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 2px;
    background: var(--accent);
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    line-height: 1.2;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1rem;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--accent);
    color: #000;
    box-shadow: 0 4px 14px rgba(0, 229, 255, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: rgba(0, 229, 255, 0.05);
}

/* Highlight focus */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: all var(--transition);
}

#navbar.scrolled {
    background: var(--bg-glass-heavy);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
}

.hero-intro {
    color: var(--accent);
    font-weight: 500;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #FFFFFF 0%, #A0A0AB 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 800px;
    line-height: 1.3;
}

.hero-desc {
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Awards Section */
.hero-awards {
    margin-top: calc(3rem + 40px);
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    max-width: 600px;
}

.awards-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.awards-logos {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.award-img {
    height: 180px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(70%);
    transition: all var(--transition);
}

.award-img:hover {
    filter: grayscale(0%) opacity(100%);
    transform: translateY(-2px);
}

#best-3d-award {
    transform: scale(3);
    margin: 0 40px;
    /* add some margin so it doesn't overlap when scaled */
}

#best-3d-award:hover {
    transform: scale(3) translateY(-2px);
}

/* Bio Section */
.bio-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .bio-content {
        grid-template-columns: 1fr 1fr;
    }
}

.bio-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.skills-grid {
    display: grid;
    gap: 1.5rem;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-category p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition);
}

@media (min-width: 768px) {
    .project-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .project-card:nth-child(even) .project-media {
        order: 2;
    }

    .project-card:nth-child(even) .project-info {
        order: 1;
    }
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-media {
    width: 100%;
    height: 100%;
    min-height: 250px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.project-media img,
.project-media video,
.project-media iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease;
    cursor: pointer;
    border: none;
}

.project-card:hover .project-media img {
    transform: scale(1.05);
}

/* Video Overlay Styles */
.video-overlay-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    z-index: 10;
}

.project-card:hover .play-button-overlay {
    background-color: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.project-info {
    padding: 2.5rem;
}

.project-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-bullets {
    list-style: none;
    margin-bottom: 2rem;
}

.project-bullets li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.project-bullets li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-award {
    height: 48px;
    object-fit: contain;
}

/* Resume */
.glassy-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .glassy-panel {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.resume-highlights h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.resume-highlights ul {
    list-style: none;
}

.resume-highlights li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.resume-highlights li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.resume-action {
    text-align: center;
    max-width: 300px;
}

.resume-action p {
    margin-bottom: 1.5rem;
}

/* Contact */
.text-center {
    text-align: center;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.contact-cta {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.site-footer p {
    margin: 0;
    font-size: 0.875rem;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-glass-heavy);
    color: var(--text-primary);
    border: 1px solid var(--border);
    font-size: 1.25rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    color: #000;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    z-index: 1001;
    width: 90%;
    max-width: 1000px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform var(--transition);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1002;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent);
}

#modal-body {
    width: 100%;
    height: auto;
    max-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modal-body img,
#modal-body video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
    }

    .nav-links {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--bg-glass-heavy);
        border-top: 1px solid var(--border);
        justify-content: space-around;
        padding: 1rem 0;
        z-index: 100;
        margin: 0;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    #navbar {
        height: 60px;
    }

    .hero {
        padding-top: 60px;
    }

    .project-card {
        border-radius: var(--radius-md);
    }

    .project-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .back-to-top {
        bottom: 90px;
    }
}