/* =========================================
   0. FONTS (IBM Plex Mono)
   ========================================= */
/* !!! PASTE ALL OF YOUR @font-face RULES HERE !!! */


/* =========================================
   1. GLOBAL & BACKGROUND
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "IBM Plex Mono", monospace;
}

html {
    scroll-behavior: smooth;
}

/* =========================================
   GLOBAL BACKGROUND & INTERACTIVE DOT GRID
   ========================================= */
body {
    background-color: #f4ead5;
    /* Richer, noticeably warmer aged paper */
    color: #1a1713;

    /* 1. The base, ultra-faint dot grid (shifted to a warm sand) */
    background-image: radial-gradient(#d6c8b3 1.2px, transparent 1.2px);
    background-size: 35px 35px;
    background-position: 0 0;
}

/* 2. The darker, interactive hover layer */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;

    /* The darker dots (shifted to a warm roasted espresso) */
    background-image: radial-gradient(#706554 1.5px, transparent 1.5px);
    background-size: 35px 35px;
    background-position: 0 0;

    /* The mask that creates the "spotlight" */
    -webkit-mask: radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
    mask: radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);

    /* Start hidden until the user moves their mouse */
    opacity: 0;
    transition: opacity 0.5s ease;
}

body:hover::before {
    opacity: 1;
}

/* =========================================
   2. STICKY SCROLL TRACK
   ========================================= */
#scroll-track {
    height: 350vh;
    position: relative;
}

#sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    /* CSS Grid completely forces perfect vertical/horizontal centering */
    display: grid;
    place-items: center;
    overflow: hidden;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* =========================================
   3. BASE TEXT STYLES & TRANSITIONS
   ========================================= */
.line {
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    opacity: 0;
    max-height: 0;

    /* CRITICAL: Strips all phantom spacing from hidden lines */
    margin: 0;
    padding: 0;
}

.l1,
.l2 {
    font-size: 2rem;
    font-weight: normal;
}

.l3 {
    font-size: 1.5rem;
    line-height: 1.6;
}

.l4 {
    font-size: 1.3rem;
}

.highlight {
    border-bottom: 2px solid #443c33;
}

.inline-nav a {
    color: #443c33;
    text-decoration: underline;
    text-underline-offset: 6px;
    margin: 0 15px;
    font-weight: bold;
}

.inline-nav a:hover {
    color: #000;
}

/* =========================================
   4. CORNER & BOTTOM ACCESSORIES
   ========================================= */
.top-logo,
.bottom-skip,
.bottom-scroll,
.bottom-footer {
    position: absolute;
    font-size: 1rem;
    color: #554d44;
    text-decoration: none;
    transition: opacity 0.5s ease;
}

.top-logo {
    top: 30px;
    left: 30px;
}

.bottom-skip {
    bottom: 30px;
    right: 30px;
    text-decoration: underline;
    /* This makes the fade smooth when scrolling up and down */
    transition: opacity 0.5s ease;
}

.bottom-scroll {
    bottom: 40px;
    text-align: center;
    line-height: 1.4;
    left: 50%;
    transform: translateX(-50%);
}

.bottom-footer {
    bottom: 30px;
    text-align: center;
    width: 100%;
    left: 0;
}

.top-logo:hover,
.bottom-skip:hover {
    color: #000;
}

/* =========================================
   5. THE STATE MACHINE (ANIMATION STEPS)
   ========================================= */

/* STATE 0: Just "hey there!" */
.state-0 .l1 {
    opacity: 1;
    max-height: 60px;
    margin-bottom: 10px;
}

.state-0 .top-logo,
.state-0 .bottom-footer {
    opacity: 0;
    pointer-events: none;
}

.state-0 .bottom-scroll,
.state-0 .bottom-skip {
    opacity: 1;
}

/* STATE 1: Add "i'm jaswanth" */
.state-1 .l1 {
    opacity: 1;
    max-height: 60px;
    margin-bottom: 10px;
}

.state-1 .l2 {
    opacity: 1;
    max-height: 60px;
}

.state-1 .top-logo,
.state-1 .bottom-footer {
    opacity: 0;
    pointer-events: none;
}

.state-1 .bottom-scroll,
.state-1 .bottom-skip {
    opacity: 1;
}

/* STATE 2: Fade "hey there!", Add Statement */
.state-2 .l1 {
    opacity: 0;
    max-height: 0;
    margin-bottom: -20px;
    transform: translateY(-20px);
}

.state-2 .l2 {
    opacity: 1;
    max-height: 60px;
    margin-bottom: 25px;
}

.state-2 .l3 {
    opacity: 1;
    max-height: 100px;
    margin-bottom: 25px;
}

.state-2 .top-logo,
.state-2 .bottom-footer {
    opacity: 0;
    pointer-events: none;
}

.state-2 .bottom-scroll,
.state-2 .bottom-skip {
    opacity: 1;
}

/* STATE 3: The Final Intro State (Nav + Header/Footer appear) */
.state-3 .l1 {
    display: none;
}

.state-3 .l2 {
    opacity: 1;
    max-height: 60px;
    margin-bottom: 25px;
}

.state-3 .l3 {
    opacity: 1;
    max-height: 100px;
    margin-bottom: 35px;
}

.state-3 .l4 {
    opacity: 1;
    max-height: 50px;
}

.state-3 .top-logo,
.state-3 .bottom-footer {
    opacity: 1;
}

.state-3 .bottom-scroll,
.state-3 .bottom-skip {
    opacity: 0;
    pointer-events: none;
}

/* --- THE VISIBILITY LOGIC FOR BOTTOM SKIP --- */
.state-0 .bottom-skip,
.state-1 .bottom-skip,
.state-2 .bottom-skip {
    opacity: 1;
    pointer-events: auto;
    /* Clickable */
}

.state-3 .bottom-skip {
    opacity: 0;
    pointer-events: none;
    /* Prevents clicking while invisible */
}

/* =========================================
   6. SUB-PAGE STYLES (work.html, etc.)
   ========================================= */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background-color: transparent;
    border: 1px solid #dcd3c6;
    border-radius: 4px;
    padding: 1.5rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    background-color: #f6efe6;
}

.project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Soften the bold text in your paragraphs */
.text-section strong {
    font-weight: 500;
    /* Change to 600 if this is slightly too thin */
}