* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

html, body {
    height: 100%;
}

body {
    background: #170840;
    background: radial-gradient(circle, rgba(23, 8, 64, 1) 0%, rgba(13, 0, 0, 1) 100%);
    color: white;
}

/* ============ SCROLL SNAP ============ */
/* This is the entire mechanism behind "scroll moves to next page".
   It's pure CSS, handled natively by the browser, so it costs nothing
   in JavaScript and doesn't fight with anything else on the page. */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.panel {
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 3rem 3rem;
    position: relative;
}

/* ============ HEADER ============ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(13, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

.logo {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: lightgray;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #7ce9e6;
}

.contact-btn {
    padding: 0.5rem 1.75rem;
    font-size: 0.95rem;
    background-color: rgba(143, 143, 143, 0.2);
    border: 1px solid rgba(102, 102, 102, 0.5);
    border-radius: 50px;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s ease;
}

.contact-btn:hover {
    background-color: #76b0ab37;
}

/* ============ HERO ============ */
.hero {
    align-items: center;
    text-align: center;
}

/* FIX: replaced the live 3D Spline WebGL scene with a single static
   blurred gradient circle. Purely decorative, costs almost nothing to
   render, and never causes GPU-related flicker on scroll. */
.hero-blob {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 34rem;
    height: 34rem;
    max-width: 70vw;
    max-height: 70vw;
    background: radial-gradient(circle, rgba(118, 176, 171, 0.35), transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    z-index: -1;
    pointer-events: none;
}

.hero h1 {
    font-size: 5.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    line-height: 1.1;
    background-image: linear-gradient(rgb(133, 133, 133), rgb(255, 255, 255));
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.location {
    margin-top: 1.5rem;
}

.location p {
    background-image: linear-gradient(to right, #76b0ab, #ffffff, #842626);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    font-size: 1.4rem;
}

.bio {
    margin-top: 2rem;
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 300;
    letter-spacing: 0.5px;
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

.accent-teal { color: #76b0ab; }
.accent-red { color: #c94b4b; }

.scroll-hint {
    margin-top: 3rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

/* ============ ABOUT ============ */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 3.2rem;
    background-image: linear-gradient(rgb(133, 133, 133), rgb(255, 255, 255));
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 70rem;
    margin: 0 auto;
    width: 100%;
}

.card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    /* FIX: only transform/opacity are transitioned anywhere in this
       stylesheet now. Both are GPU-compositor properties, so hover and
       reveal effects never trigger a layout reflow. */
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.25);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 1rem;
}

.card-text {
    color: #a8a8a8;
    line-height: 1.6;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.5rem;
    font-size: 2rem;
    color: #76b0ab;
}

.time .btn {
    margin-top: 1.5rem;
    padding: 0.7rem 1.4rem;
    background-color: rgba(124, 233, 230, 0.12);
    color: #76b0ab;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.time .btn:hover {
    background-color: #76b0ab;
    color: black;
}

/* ============ PROJECTS ============ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 60rem;
    margin: 0 auto;
    width: 100%;
}

.project-card {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    aspect-ratio: 16 / 10;
}

.project-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============ CONTACT ============ */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background-image: linear-gradient(rgb(133, 133, 133), rgb(255, 255, 255));
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.section-header p {
    color: lightgray;
    max-width: 600px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 60rem;
    margin: 0 auto;
    width: 100%;
}

.info-card {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.75rem;
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: lightgray;
}

.contact-item {
    margin-bottom: 1.25rem;
}

.contact-item p {
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #7ce9e6;
    font-size: 0.9rem;
}

.contact-item a {
    color: lightgray;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: #7ce9e6;
}

.social-link {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.social-link p {
    margin-bottom: 0.75rem;
    color: #7ce9e6;
    font-weight: 600;
    font-size: 0.9rem;
}

.social-link a {
    display: inline-block;
    margin-right: 0.75rem;
    color: lightgray;
    text-decoration: none;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.social-link a:hover {
    background-color: #7ce9e6;
    color: #131314;
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: lightgray;
    font-size: 15px;
    border: 1px solid #333;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #7ce9e6;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.message-btn {
    width: 100%;
    padding: 11px;
    background-color: rgba(124, 233, 230, 0.12);
    color: #7ce9e6;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.message-btn:hover {
    background-color: #7ce9e6;
    color: #131314;
}

.success-message {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 10px;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
    font-size: 0.9rem;
}

/* ============ FOOTER ============ */
.footer-panel {
    min-height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    background-color: rgba(124, 233, 230, 0.08);
}

.box-icons {
    display: flex;
    gap: 1.5rem;
}

.box-icons a {
    color: lightgray;
    font-size: 1.6rem;
    transition: color 0.3s ease;
}

.box-icons a:hover {
    color: #7ce9e6;
}

/* ============ REVEAL (lightweight, one-time, GPU-only) ============ */
/* Replaces AOS entirely. Each element fades/slides in once, the very
   first time it's scrolled into view, then app.js stops watching it.
   No library, no repeated toggling, no reflow. */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .nav-links { display: none; }

    .hero h1 { font-size: 3rem; letter-spacing: 1px; }

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

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

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

    .panel { padding: 5rem 1.5rem 2rem; }

    .footer-panel { flex-direction: column; gap: 1rem; text-align: center; }
}