
/* ========================================
   RESET AND BASE STYLES
   Removes default browser margins and sets
   the foundation for the rest of the page.
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    color: rgba(255, 255, 255, 0.85);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}


/* ========================================
   LAYOUT CONTAINER
   The .container class keeps content centered
   and limits its max width for readability.
   ======================================== */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 4rem 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.section-tag {
    color: rgba(245, 158, 11, 0.9);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    margin-bottom: 8px;
}

.section-title {
    color: #fff;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 1.5rem;
}


/* ========================================
   HERO SECTION
   Full-screen dark canvas with centered text overlay.
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    padding: 0;
    border-bottom: none;
    overflow: hidden;
}

.hero canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    pointer-events: none;
}

.hero-name {
    color: rgba(255, 255, 255, 0.5);
    font-size: 32px;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    margin-bottom: 16px;
}

.hero-title {
    color: #fff;
    font-size: 88px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    max-width: 1200px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 27px;
    text-align: center;
    max-width: 980px;
    line-height: 1.5;
}

.scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    letter-spacing: 0.2em;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}


/* ========================================
   EDUCATION SECTION
   Explains what neural networks are.
   ======================================== */
.lead {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

section strong {
    color: #fff;
    font-weight: 500;
}

/* Typewriter animation for the heading */
.typing {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid rgba(245, 158, 11, 0.8);
    width: 0;
    animation: typing 2.2s steps(28) 0.3s forwards,
               caret 0.7s step-end infinite;
}

@keyframes typing {
    to { width: 100%; }
}

@keyframes caret {
    50% { border-color: transparent; }
}

.formula-box {
    background: #050505;
    border: 0.5px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 1.5rem 0;
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 14px;
    color: rgba(245, 158, 11, 0.95);
    overflow-x: auto;
}

.ann-mini-wrapper {
    margin: 2rem 0;
    background: #050505;
    border-radius: 8px;
    height: 200px;
}

.ann-mini-wrapper canvas {
    display: block;
    width: 100%;
    height: 100%;
}


/* ========================================
   THREE ARCHITECTURE CARDS
   CNN, RNN, and Transformer side-by-side.
   ======================================== */
.nn-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 2rem 0;
}

.nn-type {
    background: #0f0f10;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s ease;
}

.nn-type:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.nn-type-vis {
    background: #050505;
    border-radius: 8px;
    height: 110px;
    margin-bottom: 14px;
    overflow: hidden;
}

.nn-type-vis canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.nn-type-name {
    color: #f59e0b;
    font-size: 11px;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
}

.nn-type-title {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.nn-type-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 16px;
    line-height: 1.5;
}

h3 {
    color: #fff;
    font-size: 28px;
    font-weight: 500;
    margin: 2.5rem 0 1rem;
}


/* ========================================
   APPLICATION LIST
   Two-column grid of real-world uses.
   ======================================== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 1.5rem;
}

.app-item {
    background: #0f0f10;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
}

.app-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.8);
    flex-shrink: 0;
}


/* ========================================
   SELECTED WORK SECTION
   Two-column grid of project cards.
   ======================================== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.proj-card {
    background: #0f0f10;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.proj-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.proj-vis {
    background: #050505;
    border-radius: 8px;
    height: 160px;
    margin-bottom: 16px;
    overflow: hidden;
}

.proj-vis canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.proj-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.proj-tag {
    color: rgba(245, 158, 11, 0.9);
    font-size: 11px;
    letter-spacing: 0.12em;
}

.proj-year {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

.proj-title {
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
}

.proj-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 16px;
    line-height: 1.5;
}


/* ========================================
   WRITING SECTION
   Editorial list of essays with hover effect.
   ======================================== */
.writing-list {
    list-style: none;
}

.writing-list li {
    display: flex;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    transition: padding-left 0.2s ease;
}

.writing-list li:hover {
    padding-left: 8px;
}

.writing-date {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    min-width: 60px;
    font-variant-numeric: tabular-nums;
}

.writing-title {
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.writing-list li:hover .writing-title {
    color: #f59e0b;
}


/* ========================================
   CONTACT SECTION
   Pill-shaped link buttons.
   ======================================== */
.contact-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.contact-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 12px 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.contact-link:hover {
    border-color: rgba(245, 158, 11, 0.5);
    color: #f59e0b;
}


/* ========================================
   FOOTER
   ======================================== */
footer {
    padding: 2rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}


/* ========================================
   RESPONSIVE
   Stacks columns on small screens (phones).
   ======================================== */
@media (max-width: 720px) {
    .hero-title { font-size: 32px; }
    .nn-grid, .work-grid, .app-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 1.25rem;
    }
    section {
        padding: 3rem 0;
    }
}


/* ========================================
   ACCESSIBILITY: REDUCED MOTION
   Disables animations for users who request it
   in their operating system settings.
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .scroll-cue { animation: none; }
    .typing {
        width: 100%;
        border-right: none;
        animation: none;
    }
}


/* ========================================
   BOOKING FLOW — calendar, time slots, form, success
   Added below contact grid. Inherits the page's
   existing dark + amber theme. No layout changes
   to anything above.
   ======================================== */

.booking-flow {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}

.booking-flow.gone {
    display: none;
}

.book-btn {
    background: #f59e0b;
    color: #0a0a0a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.book-btn:hover {
    background: #fab347;
}

.book-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.book-btn.secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
}

.book-btn.secondary:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: transparent;
}


/* Calendar layout + staggered piece animation */
.cal-container {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    position: relative;
}

.cal-piece {
    opacity: 0;
    transform: translateX(120px);
    transition: opacity 0.5s cubic-bezier(0.34, 1.4, 0.64, 1),
                transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.assembled .cal-piece {
    opacity: 1;
    transform: translateX(0);
}

.assembled .piece-1 { transition-delay: 0.0s; }
.assembled .piece-2 { transition-delay: 0.08s; }
.assembled .piece-3 { transition-delay: 0.16s; }
.assembled .piece-4 { transition-delay: 0.24s; }
.assembled .piece-5 { transition-delay: 0.32s; }
.assembled .piece-6 { transition-delay: 0.40s; }
.assembled .piece-7 { transition-delay: 0.48s; }
.assembled .piece-8 { transition-delay: 0.56s; }


/* Calendar header + day grid */
.cal-step-tag {
    color: rgba(245, 158, 11, 0.9);
    font-size: 11px;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.cal-header {
    background: #0f0f10;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
}

.cal-header span:last-child {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.3em;
}

.cal-day-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-day-row.labels {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    letter-spacing: 0.1em;
    padding: 0 4px;
}

.cal-day {
    text-align: center;
    font-size: 13px;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    border: 0.5px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
}

.cal-day:hover:not(.dim) {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.cal-day.dim {
    color: rgba(255, 255, 255, 0.2);
    cursor: default;
}

.cal-day.dim:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.04);
}

.cal-day.selected {
    background: #f59e0b;
    color: #0a0a0a;
    font-weight: 500;
}


/* Time slots reveal (slides down after date selection) */
.times-section {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.times-section.visible {
    opacity: 1;
    max-height: 400px;
    margin-top: 12px;
}

.times-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    margin: 0 0 10px;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.time-slot {
    background: rgba(255, 255, 255, 0.04);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    padding: 9px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.time-slot:hover {
    border-color: rgba(245, 158, 11, 0.5);
}

.time-slot.selected {
    background: #f59e0b;
    color: #0a0a0a;
    border-color: #f59e0b;
}

.cal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}


/* Stage 3 — project details form */
.form-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.form-title {
    color: #fff;
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 1rem;
}

.confirm-bar {
    background: rgba(245, 158, 11, 0.08);
    border: 0.5px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(245, 158, 11, 0.95);
}

.confirm-bar button {
    background: transparent;
    color: rgba(245, 158, 11, 0.7);
    border: 0.5px solid rgba(245, 158, 11, 0.3);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}

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

.form-field label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-field input,
.form-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 10px 12px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.6);
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.tag-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tag:hover {
    border-color: rgba(245, 158, 11, 0.5);
}

.tag.selected {
    background: #f59e0b;
    color: #0a0a0a;
    border-color: #f59e0b;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.25rem;
}


/* Stage 4 — success state */
.success-container {
    max-width: 480px;
    margin: 0 auto;
}

.success-checkmark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    border: 0.5px solid rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto 1.5rem;
}

.checkmark-svg {
    width: 28px;
    height: 28px;
    stroke: #f59e0b;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.checkmark-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
}

.booking-flow:not(.gone) .checkmark-path {
    animation: draw 0.5s 0.2s forwards ease-out;
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

.success-sub {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    margin: 0 0 1.5rem;
}

.success-sub strong {
    color: #f59e0b;
    font-weight: 500;
}


/* Reduced motion: disable staggered entrance */
@media (prefers-reduced-motion: reduce) {
    .cal-piece {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .checkmark-path {
        stroke-dashoffset: 0;
        animation: none;
    }
}
