/* ======================================
   LORIS BUKVIC PORTFOLIO — DESIGN SYSTEM
   Awwwards-Quality CSS
   ====================================== */

/* === CUSTOM PROPERTIES === */
:root {
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #161616;
    --text-primary: #f5f0eb;
    --text-secondary: #8a8a8a;
    --text-muted: #555555;
    --accent: #00ff88;
    --accent-dim: #00ff8833;
    --accent-glow: 0 0 30px rgba(0, 255, 136, 0.3);
    --border: #222222;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --nav-height: 55px;
}

/* === LIGHT MODE OVERRIDES === */
body {
    transition: background 0.6s ease, color 0.6s ease;
}

body.light-mode {
    --bg: #f5f0eb;
    --bg-elevated: #ffffff;
    --bg-card: #f0ece6;
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #999999;
    --accent: #00aa55;
    --accent-dim: #00aa5533;
    --accent-glow: 0 0 30px rgba(0, 170, 85, 0.2);
    --border: #e0ddd8;
    --glass: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.08);
}

/* Light mode — nav background */
body.light-mode .nav {
    background: linear-gradient(to bottom, rgba(245, 240, 235, 0.85) 0%, transparent 100%);
}

/* Light mode — nav site toggle */
body.light-mode .nav-site-toggle {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-mode .site-toggle-knob {
    background: rgba(0, 0, 0, 0.5);
}

body.light-mode .nav-contact-btn .btn-corners span {
    border-color: #999;
}

/* Light mode — NJ logo invert to black */
body.light-mode .nav-logo img,
body.light-mode .legal-nav-logo img {
    filter: brightness(0);
}

/* Light mode — preloader */
body.light-mode .preloader {
    background: var(--bg);
}

/* Light mode — hero title outline */
body.light-mode .hero-title-line:nth-child(2) {
    -webkit-text-stroke-color: var(--text-primary);
}

/* Light mode — hero title text shadow */
body.light-mode .hero-title-line {
    text-shadow: 0 0 80px rgba(0, 170, 85, 0.08);
}

/* Light mode — physics container */
body.light-mode .physics-container {
    background: rgba(0, 0, 0, 0.05);
}

/* Light mode — physics pills */
body.light-mode .physics-pill {
    background: rgba(255, 255, 255, 0.95);
    color: #111;
}

/* Light mode — Tools & Skills card dark */
body.light-mode .about-card-wide {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-color: rgba(255, 255, 255, 0.06);
}

body.light-mode .about-card-wide .about-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.light-mode .about-card-wide .about-card-header h3 {
    color: #f0f0f0;
}

body.light-mode .about-card-wide .about-card-icon {
    filter: brightness(0) invert(1);
}

body.light-mode .about-card-wide .physics-container {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Light mode — contact background text */
body.light-mode .contact-bg-text {
    color: rgba(0, 0, 0, 0.03);
}

/* Light mode — work cards use pastel backgrounds already, just adjust text */
body.light-mode .work-card {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* Light mode — form inputs */
body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: #f5f0eb;
    border-color: var(--border);
    color: var(--text-primary);
}

/* Light mode — contact modal */
body.light-mode .contact-modal-overlay {
    background: rgba(245, 240, 235, 0.7);
}

/* Light mode — noise overlay reduction */
body.light-mode::after {
    opacity: 0.015;
}

/* Light mode — cursor dot */
body.light-mode .cursor-dot {
    mix-blend-mode: normal;
}

/* Light mode — cursor ring */
body.light-mode .cursor-ring {
    border-color: rgba(0, 170, 85, 0.4);
}

/* Light mode — selection */
body.light-mode ::selection {
    background: var(--accent);
    color: #fff;
}

/* Light mode — core skills / clients section */
body.light-mode .clients-label {
    color: #666;
}

body.light-mode .client-name {
    color: #333;
}

body.light-mode .client-divider {
    color: #999;
}

body.light-mode .client-name:hover {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 170, 85, 0.2);
}

/* Light mode — awards section borders */
body.light-mode .awards {
    border-color: var(--border);
}

/* Light mode — slot machine stays dark for contrast */
body.light-mode .slot-machine {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 50%, #141414 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 1px rgba(0, 255, 136, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.light-mode .slot-reel {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.06);
}

body.light-mode .slot-initials {
    color: #0a0a0a;
}

body.light-mode .slot-client-name,
body.light-mode .slot-quote-text {
    color: #f5f0eb;
}

body.light-mode .slot-client-company {
    color: #8a8a8a;
}

body.light-mode .slot-stars {
    color: #f5f0eb;
}

/* Light mode — labs preview card — green block */
body.light-mode .labs-preview-card {
    background: linear-gradient(145deg, #00aa55 0%, #00994d 100%);
    border-color: rgba(0, 170, 85, 0.3);
}

body.light-mode .labs-preview-card p {
    color: rgba(255, 255, 255, 0.85) !important;
}

body.light-mode .labs-preview-arrow {
    color: #fff;
}

body.light-mode .labs-preview-card:hover {
    border-color: rgba(0, 170, 85, 0.5);
    box-shadow: 0 12px 40px rgba(0, 170, 85, 0.25);
}

body.light-mode .labs-preview-pills span {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
}

/* Theme toggle hint */
.theme-hint {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.theme-hint.visible {
    opacity: 1;
}

/* Hero title clickable cursor */
.hero-title[data-theme-toggle] {
    cursor: pointer;
}

@media (max-width: 768px) {
    .hero-title[data-theme-toggle] {
        cursor: pointer;
    }
}

/* === RESET === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    /* Aggressive deflator to guarantee shrinking on their scaled display */
    scroll-behavior: auto;
    /* Lenis handles smooth scroll */
    background: #0a0a0a;
    overscroll-behavior: none;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: none;
    background: none;
    color: inherit;
    font-family: inherit;
    cursor: none;
}

img {
    max-width: 100%;
    display: block;
}

/* === CUSTOM CURSOR === */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out-expo),
        height 0.3s var(--ease-out-expo),
        background 0.3s;
    mix-blend-mode: difference;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(0, 255, 136, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out-expo),
        height 0.4s var(--ease-out-expo),
        border-color 0.3s,
        background 0.3s;
}

.cursor-hover .cursor-dot {
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 136, 0.15);
}

.cursor-hover .cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--accent);
}

/* === PRELOADER === */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.preloader-inner {
    text-align: center;
    width: 300px;
}

.preloader-text {
    margin-bottom: 40px;
}

.preloader-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.preloader-sub {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.preloader-counter {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}

.preloader-bar {
    width: 100%;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* Labs Preview Card (Homepage) */
.labs-preview-wrapper {
    margin-top: 40px;
}

.labs-preview-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 20px;
    padding: clamp(24px, 6vw, 40px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.labs-preview-card:hover {
    border-color: rgba(0, 255, 136, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.labs-preview-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: clamp(20px, 4vw, 30px);
    flex-direction: column;
}

.labs-preview-content {
    flex: 1;
    min-width: 0;
}

.labs-preview-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.labs-preview-pills span {
    font-size: 0.6rem;
    padding: 6px 14px;
    border-radius: 100px;
}

.labs-preview-arrow {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
    align-self: flex-start;
}

@media (min-width: 768px) {
    .labs-preview-inner {
        flex-direction: row;
        align-items: center;
    }
    
    .labs-preview-arrow {
        align-self: auto;
    }
}

/* === NAVIGATION === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 60px);
    z-index: 500;
    opacity: 0;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.8) 0%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-logo {
    color: var(--text-primary);
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.nav-logo:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 40px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-primary);
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-contact-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 6px 16px;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    transition: color 0.3s, padding 0.3s var(--ease-out-expo);
}

.nav-contact-btn:hover {
    color: var(--accent);
}

.btn-corners span {
    position: absolute;
    width: 12px;
    height: 12px;
    transition: all 0.4s var(--ease-out-expo);
}

.btn-corners span:nth-child(1) {
    top: 0;
    left: 0;
    border-top: 1.5px solid var(--text-muted);
    border-left: 1.5px solid var(--text-muted);
    border-radius: 6px 0 0 0;
}

.btn-corners span:nth-child(2) {
    top: 0;
    right: 0;
    border-top: 1.5px solid var(--text-muted);
    border-right: 1.5px solid var(--text-muted);
    border-radius: 0 6px 0 0;
}

.btn-corners span:nth-child(3) {
    bottom: 0;
    left: 0;
    border-bottom: 1.5px solid var(--text-muted);
    border-left: 1.5px solid var(--text-muted);
    border-radius: 0 0 0 6px;
}

.btn-corners span:nth-child(4) {
    bottom: 0;
    right: 0;
    border-bottom: 1.5px solid var(--text-muted);
    border-right: 1.5px solid var(--text-muted);
    border-radius: 0 0 6px 0;
}

.nav-contact-btn:hover .btn-corners span {
    border-color: var(--accent);
    width: 16px;
    height: 16px;
}

/* === HERO CTA BUTTON === */
.hero-contact-btn {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 14px 34px;
    margin-top: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: transparent;
    border: 1px solid rgba(0, 255, 136, 0.15);
    transition: all 0.4s var(--ease-out-expo);
    cursor: none;
    opacity: 0; /* Animated in with GSAP */
}

.hero-contact-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0, 255, 136, 0.1);
}

/* === HERO === */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 clamp(20px, 4vw, 60px);
}

.hero-top {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 3;
}

.hero-label {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--accent);
    text-transform: uppercase;
    padding: 5px 16px;
    border: 1px solid var(--accent-dim);
    border-radius: 100px;
    background: rgba(0, 255, 136, 0.05);
    opacity: 0;
}

.hero-title {
    font-family: var(--font-heading);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 0.9;
    width: 100%;
    text-align: center;
}

.hero-title-line {
    display: block;
    font-size: clamp(4rem, min(11vw, 22vh), 10rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.9;
    color: var(--text-primary);
    text-shadow: 0 0 80px rgba(0, 255, 136, 0.1);
    opacity: 0;
}

.hero-title-line:nth-child(2) {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1.5px var(--text-primary);
}

.hero-bottom {
    position: absolute;
    bottom: 60px;
    left: clamp(20px, 4vw, 60px);
    right: clamp(20px, 4vw, 60px);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hero-tagline {
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: left;
    max-width: 380px;
    opacity: 0;
}

.hero-scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 1;
        transform: scaleY(1);
    }

    50% {
        opacity: 0.3;
        transform: scaleY(0.5);
    }
}

.hero-scroll-indicator span {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    writing-mode: vertical-rl;
}

/* === SECTION COMMON === */
.section-header {
    padding: 0 clamp(20px, 4vw, 60px);
    margin-bottom: 40px;
}

.section-label {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

/* === ABOUT === */
.about {
    padding: 80px 0 60px;
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 0 clamp(20px, 4vw, 60px);
}

.about-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px;
    backdrop-filter: blur(20px);
    transition: border-color 0.4s, transform 0.4s var(--ease-out-expo);
}

.about-card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-4px);
}

.about-card-wide {
    grid-column: span 2;
}

.about-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.about-card-icon {
    font-size: 1.1rem;
}

.about-card-header h3 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.timeline-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-year {
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.timeline-item h4 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.timeline-item p {
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Tools Grid */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tool-tag {
    position: relative;
    padding: 10px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    transition: all 0.4s var(--ease-out-expo);
    cursor: default;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 120px;
    overflow: hidden;
}

.tool-tag-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.tool-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.4s var(--ease-out-expo);
}

.tool-tag-name {
    transition: color 0.3s;
}

.tool-meter {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 0;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s var(--ease-out-expo),
        opacity 0.3s,
        margin-top 0.4s var(--ease-out-expo);
}

.tool-meter-fill {
    height: 100%;
    width: 0%;
    background: var(--hover-color, var(--accent));
    border-radius: 100px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px rgba(var(--hover-color-rgb, 0, 255, 136), 0.4);
}

.tool-tag-pct {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hover-color, var(--accent));
    letter-spacing: 0.05em;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out-expo),
        opacity 0.3s 0.1s;
    margin-top: 0;
    text-align: right;
}

.tool-tag:hover {
    background: rgba(var(--hover-color-rgb, 0, 255, 136), 0.05);
    border-color: var(--hover-color, var(--accent));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--hover-color-rgb, 0, 255, 136), 0.15);
    padding-bottom: 14px;
}

.tool-tag:hover .tool-tag-name {
    color: var(--hover-color, var(--accent));
}

.tool-tag:hover .tool-logo {
    transform: scale(1.15);
}

.tool-tag:hover .tool-meter {
    max-height: 6px;
    opacity: 1;
    margin-top: 10px;
}

.tool-tag:hover .tool-meter-fill {
    width: calc(var(--level) * 1%);
}

.tool-tag:hover .tool-tag-pct {
    max-height: 20px;
    opacity: 1;
    margin-top: 4px;
}

/* Services */
.services-list {
    display: flex;
    flex-direction: column;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left 0.4s var(--ease-out-expo);
}

.service-item:last-child {
    border-bottom: none;
}

.service-item:hover {
    padding-left: 16px;
}

.service-number {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    min-width: 30px;
}

.service-name {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* === PHYSICS SKILLS === */
.physics-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    cursor: none;
}

.physics-pill {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    will-change: transform;
    transition: box-shadow 0.3s;
}

.pill-icon {
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1;
}

/* === AWARDS MARQUEE === */
.awards {
    padding: 40px 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee-wrapper {
    overflow: hidden;
    margin-bottom: 30px;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee {
    display: flex;
    width: max-content;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* marquee keeps running on hover */

.marquee-content {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
    flex-shrink: 0;
    animation: marqueeScroll 30s linear infinite;
}

.marquee-item {
    font-family: var(--font-heading);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 500;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.02em;
    transition: color 0.3s;
}

.marquee-item:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* Light mode awards marquee */
body.light-mode .marquee-item {
    color: rgba(0, 0, 0, 0.15);
}
body.light-mode .marquee-item:hover {
    color: rgba(0, 0, 0, 0.5);
}

.marquee-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: var(--accent-glow);
}

/* Clients */
.clients {
    text-align: center;
    padding: 0 clamp(20px, 4vw, 60px);
}

.clients-label {
    display: block;
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.clients-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.client-name {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s, text-shadow 0.3s;
}

.client-name:hover {
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.client-divider {
    color: var(--text-muted);
    font-size: 0.4rem;
}

/* === BRANDS I'VE WORKED WITH === */
.brands-section {
    padding: 60px 0 40px;
    text-align: center;
    overflow: hidden;
}

.brands-title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 32px;
}

.brands-marquee-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.brands-marquee {
    display: flex;
    width: max-content;
}

.brands-marquee-track {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
    flex-shrink: 0;
    animation: brandsScroll 20s linear infinite;
}

.brand-logo-text {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.3s;
    text-decoration: none;
}

.brand-logo-text:hover {
    color: rgba(255, 255, 255, 0.6);
}

.brand-dot {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

@keyframes brandsScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Light mode brands */
body.light-mode .brand-logo-text {
    color: rgba(0, 0, 0, 0.15);
}
body.light-mode .brand-logo-text:hover {
    color: rgba(0, 0, 0, 0.5);
}
body.light-mode .brand-dot {
    color: rgba(0, 0, 0, 0.1);
}

/* === WORKS === */
.works {
    padding: 80px 0 40px;
}

/* Card Container */
.works-stack {
    padding: 0 clamp(20px, 8vw, 150px);
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Work Card — Adyasha-inspired (Sticky Stack) */
.work-card {
    position: sticky;
    top: 100px;
    display: block;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 40px;
    transition: box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--card-bg, #E8E4F0);
    color: var(--card-text, #2a2438);
    text-decoration: none;
    will-change: transform;
    transform-origin: center top;
}

.work-card:nth-child(2) {
    top: 120px;
}

.work-card:nth-child(3) {
    top: 140px;
}

.work-card:nth-child(4) {
    top: 160px;
}

.work-card:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

/* Card Header: Year + Category */
.work-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 36px 0;
}

.work-card-year {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--card-text, #2a2438);
    opacity: 0.6;
}

.work-card-category {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--card-text, #2a2438);
    opacity: 0.5;
}

/* Card Title Row: Title + Arrow */
.work-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 36px 24px;
    gap: 20px;
}

.work-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
    color: var(--card-text, #2a2438);
    letter-spacing: -0.02em;
}

.work-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    color: var(--card-text, #2a2438);
    opacity: 0.4;
    transition: opacity 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card:hover .work-card-arrow {
    opacity: 1;
    transform: rotate(45deg);
}

/* Card Image Area */
.work-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin: 0 24px 24px;
    border-radius: 16px;
}

/* Behance Iframe Thumbnail */
.work-card-iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    overflow: hidden;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card:hover .work-card-iframe {
    transform: scale(1.03);
}

/* Overlay */
.work-card-overlay {
    display: none;
}

.work-card-info,
.work-card-hover,
.work-card-view {
    display: none;
}

/* === MOBILE WORKS === */
@media (max-width: 768px) {
    .work-card-header {
        padding: 20px 24px 0;
    }

    .work-card-title-row {
        padding: 8px 24px 16px;
    }

    .work-card-title {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    .work-card-arrow {
        width: 40px;
        height: 40px;
    }

    .work-card-arrow svg {
        width: 22px;
        height: 22px;
    }

    .work-card-image {
        margin: 0 16px 16px;
        border-radius: 12px;
    }

    .work-card-year {
        font-size: 0.65rem;
    }

    .work-card-category {
        font-size: 0.55rem;
    }

    .brands-marquee-track {
        gap: 24px;
        padding-right: 24px;
    }

    .brand-logo-text {
        font-size: 1rem;
    }
}

/* === EXTRAS SECTIONS === */
.extras-section {
    padding: 60px 0;
}

.extras-content {
    padding: 0 clamp(20px, 4vw, 60px);
}

/* Remove double-padding when section-header is inside extras-content */
.extras-content .section-header {
    padding: 0;
}

.extras-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 20px auto 40px;
    line-height: 1.7;
}

/* Tools Grid (CV Builder + Poster Maker side by side) */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.tool-card {
    text-align: center;
    padding: 60px 40px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.4s var(--ease-out-expo);
}

.tool-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.1);
    transform: translateY(-4px);
}

.tool-card .extras-description {
    margin: 20px auto 30px;
    max-width: 600px;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .tool-card {
        padding: 40px 24px;
    }
}

/* Game Cards */
.games-grid {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.game-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s var(--ease-out-expo);
    cursor: pointer;
    flex: 1;
}

.game-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.1);
    transform: translateY(-4px);
}

.game-card-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.game-card-content h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.game-card-content p {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.game-card-btn {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    border: none;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: var(--accent-glow);
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
}

/* AI Tool Cards */
.ai-tool-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    overflow: hidden;
}

/* Split Layout for Image Generator */
.ai-tool-card.split-layout {
    display: flex;
    padding: 0;
    min-height: 280px;
}

.ai-image-display {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 1px solid var(--glass-border);
    min-height: 280px;
}

.ai-image-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    /* Hide broken image icon initially */
}

/* Download Button Overlay */
.ai-download-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 20;
    padding: 10px 18px;
    background: rgba(10, 10, 10, 0.7);
    color: var(--accent);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    text-transform: uppercase;
}

.ai-download-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    transform: translateY(-2px);
}

.ai-loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    color: var(--accent);
    font-family: var(--font-code);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    animation: pulse 1.5s infinite;
    pointer-events: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.ai-controls {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.ai-tool-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ai-tool-icon {
    font-size: 1.5rem;
}

.ai-tool-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.ai-tool-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Textarea for Prompt */
.ai-textarea {
    width: 100%;
    height: 90px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-body);
    resize: none;
    outline: none;
    transition: border-color 0.3s;
    margin-bottom: 20px;
}

.ai-textarea:focus {
    border-color: var(--accent);
}

/* Buttons */
.ai-generate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 32px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    border: none;
    border-radius: 100px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.ai-generate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-generate-btn:hover::before {
    opacity: 1;
}

.ai-generate-btn.full-width {
    width: auto;
    margin-bottom: 30px;
}

.ai-generate-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.ai-generate-btn:hover:not(.loading) {
    transform: scale(1.02);
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.5);
}

/* Suggestion Pills */
.ai-suggestions {
    margin-top: auto;
}

.suggestions-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.suggestion-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.65rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 255, 136, 0.05);
}

/* Regular Input Group (Chatbot) */
.ai-input-group {
    display: flex;
    gap: 10px;
}

.ai-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.75rem;
    outline: none;
    transition: border-color 0.3s;
}

.ai-input:focus {
    border-color: var(--accent);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chat Messages */
.chat-messages {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    line-height: 1.5;
    max-width: 80%;
}

.chat-message.bot {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.15);
    align-self: flex-start;
    color: var(--text-primary);
}

.chat-message.user {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-self: flex-end;
    color: var(--text-primary);
}

/* === CONTACT === */
.contact {
    position: relative;
    padding: 120px 0 80px;
    text-align: center;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-bg-text {
    position: absolute;
    font-family: var(--font-heading);
    font-size: clamp(10rem, 25vw, 25rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    letter-spacing: -0.05em;
}

.contact-content {
    position: relative;
    z-index: 2;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.contact-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 34px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    border-radius: 100px;
    cursor: none;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.contact-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.contact-cta:hover::before {
    opacity: 1;
}

.contact-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.5);
}

.contact-socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}

.social-link {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    position: relative;
    transition: color 0.3s;
    cursor: none;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out-expo);
}

.social-link:hover {
    color: var(--accent);
}

.social-link:hover::after {
    width: 100%;
}

/* === FOOTER === */
.footer {
    padding: 30px clamp(20px, 4vw, 60px);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content > * {
    flex: 1;
}

.footer-copyright,
.footer-made {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.footer-copyright {
    text-align: left;
}

.footer-made {
    text-align: right;
}

.footer-privacy {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.3s;
    text-align: center;
}

.footer-privacy:hover {
    color: var(--accent);
}

/* === CONTACT MODAL === */
.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

.contact-modal.open {
    pointer-events: all;
    opacity: 1;
    visibility: visible;
}

.contact-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.contact-modal-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    height: 100%;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    padding: 60px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.6s var(--ease-out-expo);
}

.contact-modal.open .contact-modal-panel {
    transform: translateX(0);
}

.contact-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
    cursor: none;
}

.contact-modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.contact-modal-content {
    padding-top: 40px;
}

.contact-modal-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-modal-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    border-radius: 100px;
    cursor: none;
    transition: all 0.3s var(--ease-out-expo);
    width: 100%;
    justify-content: center;
}

.form-submit:hover {
    box-shadow: var(--accent-glow);
    transform: translateY(-2px);
}

.contact-modal-info {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.contact-modal-info a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.contact-modal-info a:hover {
    color: var(--accent);
}

/* === ANIMATIONS (handled by GSAP in app.js) === */

/* Noise overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 128px 128px;
}

/* Grain animation */
@keyframes grain {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -10%);
    }

    20% {
        transform: translate(-15%, 5%);
    }

    30% {
        transform: translate(7%, -25%);
    }

    40% {
        transform: translate(-5%, 25%);
    }

    50% {
        transform: translate(-15%, 10%);
    }

    60% {
        transform: translate(15%, 0%);
    }

    70% {
        transform: translate(0%, 15%);
    }

    80% {
        transform: translate(3%, 35%);
    }

    90% {
        transform: translate(-10%, 10%);
    }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card-wide {
        grid-column: span 1;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 55px;
        /* Matched to desktop */
    }

    .cursor-dot,
    .cursor-ring {
        display: none;
    }

    body {
        cursor: auto;
    }

    button,
    a,
    .filter-btn,
    .contact-cta,
    .form-submit,
    .social-link,
    .contact-modal-close {
        cursor: pointer;
    }

    .nav-links {
        display: none;
    }

    /* Preloader — smaller on mobile */
    .preloader-name {
        font-size: 0.9rem;
        letter-spacing: 0.2em;
    }

    .preloader-sub {
        font-size: 0.5rem;
    }

    .preloader-counter {
        font-size: 2rem;
    }

    .preloader-inner {
        width: 220px;
    }

    .preloader-text {
        margin-bottom: 24px;
    }

    /* AI Tool — more compact on mobile */
    .ai-tool-header h3 {
        font-size: 0.9rem;
    }

    .ai-tool-desc {
        font-size: 0.6rem;
        margin-bottom: 10px;
    }

    .ai-textarea {
        height: 50px;
        padding: 8px 10px;
        font-size: 0.7rem;
        margin-bottom: 12px;
    }

    .ai-generate-btn {
        padding: 8px 20px;
        font-size: 0.65rem;
        width: auto;
    }

    .ai-generate-btn.full-width {
        width: auto;
        margin-bottom: 16px;
    }

    .ai-suggestions {
        display: none;
    }

    .nav-contact-btn {
        padding: 6px 14px;
        font-size: 0.5rem;
    }

    /* Hero fixes */
    .hero {
        min-height: -webkit-fill-available;
    }

    .hero-title-line {
        font-size: clamp(5rem, 24vw, 9rem);
        text-align: center;
        width: 100%;
    }

    .hero-label {
        font-size: 0.55rem;
        letter-spacing: 0.15em;
        padding: 5px 14px;
        white-space: nowrap;
    }

    .hero-top {
        top: 130px;
    }

    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        bottom: 50px;
    }

    .hero-scroll-indicator {
        align-self: center;
    }

    .hero-scroll-indicator {
        display: none;
    }

    .scroll-line {
        height: 20px;
    }

    .about-card {
        padding: 24px;
    }

    /* Mobile sizing for physics skills container */
    .physics-container {
        height: 200px;
    }

    .physics-pill {
        padding: 6px 12px;
        font-size: 0.65rem;
    }

    .pill-icon {
        font-size: 0.75rem;
    }


    /* Keep stacking on mobile but with smaller offsets */
    .work-card {
        top: 80px;
        margin-bottom: 30px;
    }

    .work-card:nth-child(2) {
        top: 96px;
    }

    .work-card:nth-child(3) {
        top: 112px;
    }

    .work-card:nth-child(4) {
        top: 128px;
    }

    /* AI Tools split layout — stack vertically on mobile */
    .ai-tool-card.split-layout {
        flex-direction: column;
        min-height: auto;
    }

    .ai-image-display {
        min-height: 100px;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .ai-controls {
        padding: 16px;
    }

    .ai-tool-card {
        margin: 16px;
        padding: 16px;
    }

    /* Section titles */
    .section-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .contact-socials {
        flex-wrap: wrap;
        gap: 14px;
    }

    .social-link {
        font-size: 0.5rem;
    }

    .contact-modal-panel {
        max-width: 100%;
    }

    .clients-list {
        flex-wrap: wrap;
        gap: 20px;
    }

    .games-grid {
        flex-direction: column;
    }

    /* Footer — mobile responsive */
    .footer {
        padding: 16px clamp(12px, 3vw, 30px);
    }

    .footer-copyright,
    .footer-made,
    .footer-privacy {
        font-size: 0.45rem;
    }

    .rights-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-tagline {
        font-size: 0.7rem;
        text-align: center;
    }

    .hero-bottom {
        bottom: 90px;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .hero-title-line {
        font-size: clamp(4.5rem, 24vw, 8rem);
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.7rem;
    }

    .contact-cta {
        padding: 12px 28px;
        font-size: 0.75rem;
    }
}

/* === SCROLLBAR === */
html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg);
}