/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --color-bg-light: #ffffff;
    --color-text-light: #0b0b0b;
    --color-bg-dark: #0b0b0b;
    --color-text-dark: #ffffff;

    --color-google-red: #ea4335;
    --color-google-blue: #4285f4;
    --color-google-yellow: #fbbc04;
    --color-google-green: #34a853;

    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --border-radius-large: 40px;
    --border-radius-pill: 100px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

    --section-padding: 140px;
    --content-max-width: 1200px;
    --side-padding: 48px;
    --panel-margin: 32px;
}

/* ============================================
   RESET & GLOBAL
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

#smooth-wrapper {
    position: relative;
    z-index: 1;
}

#smooth-content {
    position: relative;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none;
}

::selection {
    background: var(--color-google-blue);
    color: white;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    will-change: transform;
    transition: width 0.35s var(--ease-out-expo),
                height 0.35s var(--ease-out-expo),
                border-color 0.35s,
                background-color 0.35s,
                opacity 0.35s;
}

.cursor-ring.hover {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.9);
}

@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none !important; }
    body { cursor: auto; }
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    z-index: 10002;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg,
        var(--color-google-blue),
        var(--color-google-green),
        var(--color-google-yellow),
        var(--color-google-red));
    will-change: transform;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px var(--side-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    color: var(--color-text-light);
    transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.glass {
    background: #ffffff;
    padding: 10px var(--side-padding);
    color: #000000;
    border-bottom-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: opacity 0.3s ease;
}

.nav-links a:hover { opacity: 0.7; }

.btn-primary-small {
    background: var(--color-text-light);
    color: var(--color-bg-light) !important;
    padding: 11px 26px;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    transition: background 0.3s, color 0.3s, transform 0.3s var(--ease-out-expo);
}

.navbar.glass .btn-primary-small {
    background: white;
    color: #0b0b0b !important;
}

/* ============================================
   PANELS (Core Layout)
   ============================================ */
.panel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero     { z-index: 1; }
#about    { z-index: 2; }
#projects { z-index: 3; }
#contact  { z-index: 4; }

/* ============================================
   HERO
   ============================================ */
.hero {
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 960px;
    padding: 0 var(--side-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.04);
    padding: 8px 20px 8px 12px;
    border-radius: 100px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-brand-icon {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--color-google-blue), var(--color-google-green), var(--color-google-red));
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(4rem, 9vw, 9.5rem);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin-bottom: 48px;
    max-width: 1000px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-block;
    background-color: var(--color-text-light);
    color: var(--color-bg-light);
    padding: 16px 36px;
    border-radius: var(--border-radius-pill);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: transform 0.4s var(--ease-out-expo), background-color 0.3s;
    border: none;
    cursor: none;
    will-change: transform;
}

.btn-primary:hover { background-color: #222; }

.btn-secondary {
    display: inline-block;
    background-color: #f1f3f4;
    color: var(--color-text-light);
    padding: 16px 36px;
    border-radius: var(--border-radius-pill);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: transform 0.4s var(--ease-out-expo), background-color 0.3s;
    cursor: none;
    will-change: transform;
}

.btn-secondary:hover { background-color: #e4e6e8; }

/* ============================================
   STACKING PANELS
   ============================================ */
.stack-panel {
    /* Normal section, no stacking effects */
}

.dark-panel {
    background-color: var(--color-bg-dark);
    color: var(--color-text-dark);
}

.light-panel {
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
}

.panel-inner {
    width: 100%;
    max-width: var(--content-max-width);
    padding: var(--section-padding) var(--side-padding);
    margin: 0 auto;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
}

.section-desc {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 40px;
    color: #999;
    max-width: 560px;
}

.light-panel .section-desc { color: #666; }
.text-center { text-align: center; }

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */
.two-col {
    display: flex;
    gap: 100px;
    align-items: center;
}

.col-left, .col-right { flex: 1; }

.image-card {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: url('../assets/about_me.png') center / cover;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

.abstract-shape {
    position: absolute;
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, var(--color-google-blue), var(--color-google-green));
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(50px);
    opacity: 0.5;
    animation: shapeFloat 8s ease-in-out infinite alternate;
}

@keyframes shapeFloat {
    0%   { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-45%, -55%) scale(1.15); }
}

.link-arrow {
    color: inherit;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
    transition: gap 0.4s var(--ease-out-expo);
    cursor: none;
}

.link-arrow:hover { gap: 18px; }

/* ============================================
   PROJECT CAROUSEL
   ============================================ */
.carousel {
    display: flex;
    gap: 36px;
    overflow-x: auto;
    padding-bottom: 48px;
    margin-top: 64px;
    scrollbar-width: none;
    cursor: none;
    
    /* Break out of container for edge-to-edge scroll */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.carousel::-webkit-scrollbar { display: none; }

.project-card {
    min-width: 380px;
    flex-shrink: 0;
    position: relative;
    cursor: none;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: 60px;
    border-radius: 36px;
    background: linear-gradient(135deg,
        rgba(66, 133, 244, 0.25),
        rgba(52, 168, 83, 0.25));
    opacity: 0;
    filter: blur(30px);
    transition: opacity 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

.project-card:hover::before { opacity: 1; }

.project-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
    transition: transform 0.6s var(--ease-out-expo);
    will-change: transform;
}

.project-img-wrap:hover { transform: scale(1.02); }

.project-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s var(--ease-out-expo), filter 0.6s;
}

.project-img-wrap:hover .project-img {
    transform: scale(1.06);
    filter: saturate(1.15);
}

.project-img.c-1 { background: url('../assets/color_manager.png') center / cover; }
.project-img.c-2 { background: url('../assets/textile_orders.png') center / cover; }
.project-img.c-3 { background: url('../assets/monday.png') center / cover; }

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.project-card p {
    color: #666;
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 1rem;
}

.tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.project-card:hover .tag {
    background: var(--color-text-light);
    color: var(--color-bg-light);
    border-color: var(--color-text-light);
}

/* ============================================
   SKILLS CAROUSEL
   ============================================ */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}
.section-header-row .section-title {
    margin-bottom: 0;
}

.skill-card {
    min-width: 320px;
    height: 320px;
    flex-shrink: 0;
    cursor: none;
    border-radius: 28px;
    background-color: #0b0b0b;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s var(--ease-out-expo);
}

.skill-card:hover {
    transform: scale(1.02);
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
    opacity: 0.6;
}

.orb {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    filter: blur(60px);
    position: absolute;
    z-index: 0;
    opacity: 0.8;
}

.orb-blue { background: var(--color-google-blue); }
.orb-green { background: var(--color-google-green); }
.orb-yellow { background: var(--color-google-yellow); }
.orb-red { background: var(--color-google-red); }
.orb-purple { background: #9B7BFF; }
.orb-cyan { background: #00cfff; }
.orb-white { background: #ffffff; }

.skill-title-graphic {
    position: relative;
    z-index: 1;
    font-size: 1.8rem;
    font-weight: 500;
    color: white;
    letter-spacing: -0.03em;
    text-align: center;
    padding: 0 20px;
}

/* ============================================
   CONTACT FORM (Compact)
   ============================================ */
.contact-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 720px;
}

.contact-header {
    margin-bottom: 40px;
}

.contact-subtitle {
    color: #666;
    font-size: 1.15rem;
    line-height: 1.5;
}

.compact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-row {
    display: flex;
    gap: 24px;
}

.form-row .input-group { flex: 1; }

.input-group {
    position: relative;
    width: 100%;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #2a2a2a;
    padding: 12px 0;
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.4s ease;
    resize: none;
    cursor: none;
}

.input-group label {
    position: absolute;
    left: 0;
    top: 12px;
    color: #555;
    font-size: 1.1rem;
    pointer-events: none;
    transition: all 0.3s var(--ease-out-expo);
}

.input-group input:focus,
.input-group textarea:focus {
    border-bottom-color: var(--color-google-blue);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label {
    top: -18px;
    font-size: 0.8rem;
    color: var(--color-google-blue);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.input-file-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-file-group input[type="file"] {
    color: #777;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: none;
    max-width: 180px;
}

.file-label {
    color: #555;
    font-size: 0.95rem;
    white-space: nowrap;
}

.submit-btn {
    background: white;
    color: black;
    padding: 14px 32px;
    font-size: 15px;
}

.submit-btn:hover { background: #e0e0e0; }

#form-status {
    margin-top: 8px;
}

/* ============================================
   FOOTER — Massive Wordmark (Antigravity Style)
   ============================================ */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 0;
    background: var(--color-bg-light);
    color: var(--color-text-light);
    display: flex;
    flex-direction: column;
    padding: 100px var(--side-padding) 40px;
    overflow: hidden;
}

.footer-top {
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 80px;
}

.footer-tagline {
    font-size: 1.1rem;
    color: #888;
    max-width: 200px;
    line-height: 1.5;
}

.footer-nav {
    display: flex;
    gap: 64px;
}

.footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav-col a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    cursor: none;
}

.footer-nav-col a:hover { color: var(--color-text-light); }

.footer-brand {
    width: 100%;
    text-align: center;
    padding: 60px 0;
    overflow: hidden;
}

.footer-wordmark {
    font-size: clamp(6rem, 18vw, 16rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--color-text-light);
    line-height: 0.9;
    display: block;
    white-space: nowrap;
    user-select: none;
}

.footer-bottom {
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #999;
}

/* Spacer to reveal footer - must NOT have a background */
.footer-spacer {
    height: 800px; /* Fallback, will be set dynamically by JS */
    position: relative;
    pointer-events: none;
    background: transparent !important;
}

/* ============================================
   SUCCESS / ERROR
   ============================================ */
.success-msg { color: var(--color-google-green); font-size: 1rem; }
.error-msg   { color: var(--color-google-red);   font-size: 1rem; }

/* ============================================
   LOADING SCREEN
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    background: var(--color-bg-dark);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.loader-bar {
    width: 100px;
    height: 3px;
    background: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, var(--color-google-blue), var(--color-google-green));
    border-radius: 2px;
    animation: loaderSlide 1s ease-in-out infinite;
}

@keyframes loaderSlide {
    0%   { left: -40%; }
    100% { left: 100%; }
}

.loader-text {
    color: #444;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --section-padding: 100px;
        --side-padding: 36px;
    }
    .two-col { gap: 60px; }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
        --side-padding: 24px;
        --panel-margin: 16px;
    }
    .navbar { padding: 16px var(--side-padding); }
    .nav-links { gap: 20px; }
    .two-col { flex-direction: column; gap: 48px; }
    .hero-title { font-size: clamp(2.5rem, 8vw, 3.5rem); letter-spacing: -0.04em; }
    .project-card { min-width: 300px; }
    .section-title { font-size: 2.4rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .footer-top { flex-direction: column; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .footer-wordmark { font-size: clamp(3.5rem, 14vw, 8rem); }
    .form-row { flex-direction: column; gap: 28px; }
    .form-footer { flex-direction: column; align-items: flex-start; }
    .cursor-dot, .cursor-ring { display: none !important; }
    body { cursor: auto; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.4rem; }
    .section-title { font-size: 2rem; }
    .project-card { min-width: 260px; }
    .btn-primary, .btn-secondary { padding: 14px 28px; font-size: 14px; }
}
