/* ============================================
   KARTIKEYA NAINKHWAL — Portfolio
   Luxury dark aesthetic, editorial layout
   ============================================ */

:root {
    --bg:            #060606;
    --bg-light:      #0e0e0c;
    --bg-card:       #111110;
    --cream:         #ede4ce;
    --cream-dim:     rgba(237, 228, 206, 0.6);
    --cream-muted:   rgba(237, 228, 206, 0.35);
    --cream-faint:   rgba(237, 228, 206, 0.05);
    --border:        rgba(237, 228, 206, 0.1);
    --border-hover:  rgba(237, 228, 206, 0.28);
    --gold:          #c9a227;
    --gold-glow:     rgba(201, 162, 39, 0.14);
    --gold-dim:      rgba(201, 162, 39, 0.5);
    --serif:         'Playfair Display', 'Georgia', serif;
    --sans:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease:          cubic-bezier(0.19, 1, 0.22, 1);
    --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--cream-muted) var(--bg);
}

html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: var(--cream-muted); border-radius: 10px; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--cream); color: var(--bg); }

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-dim));
    z-index: 10001;
    box-shadow: 0 0 12px var(--gold-glow);
    transition: width 0.05s linear;
    pointer-events: none;
}

/* ===== Loader ===== */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    display: flex;
    gap: 6px;
}

.loader-letter {
    font-family: var(--serif);
    font-size: 4.5rem;
    color: var(--cream);
    opacity: 0;
    transform: translateY(32px);
    animation: loaderIn 0.7s var(--ease) forwards;
}

.loader-letter:nth-child(2) {
    animation-delay: 0.18s;
}

.loader-line {
    width: 40px;
    height: 1px;
    background: var(--gold);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    animation: loaderLineIn 0.5s var(--ease) 0.5s forwards;
}

@keyframes loaderIn {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes loaderLineIn {
    to { opacity: 1; transform: scaleX(1); }
}

/* ===== Grain Overlay ===== */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Custom Cursor ===== */
.cursor {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1px solid var(--cream-muted);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease), height 0.4s var(--ease),
                border-color 0.3s ease, background 0.3s ease;
    mix-blend-mode: difference;
    display: none;
}

.cursor.hover {
    width: 64px;
    height: 64px;
    border-color: var(--cream);
    background: rgba(237, 228, 206, 0.07);
}

.cursor-dot {
    position: fixed;
    width: 5px;
    height: 5px;
    background: var(--cream);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .cursor, .cursor-dot { display: block; }
    body { cursor: none; }
    a, button, .glink, .social-icon, .proj, .stags span, .magnetic { cursor: none; }
}

/* ===== Floating Dot Nav ===== */
.float-nav {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.float-nav.show {
    opacity: 1;
    pointer-events: all;
}

.fn-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cream-muted);
    display: block;
    transition: all 0.4s var(--ease);
    position: relative;
}

.fn-dot::before {
    content: attr(data-label);
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    white-space: nowrap;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cream-muted);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s var(--ease);
    pointer-events: none;
}

.fn-dot:hover::before,
.fn-dot.active::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.fn-dot:hover,
.fn-dot.active {
    background: var(--cream);
    transform: scale(1.5);
    box-shadow: 0 0 0 3px rgba(237, 228, 206, 0.12);
}

/* =============================================
   HOME — Full viewport
   ============================================= */
.home {
    width: 100vw;
    height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* Ambient glows */
.home-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.home-glow--a {
    top: -15%;
    right: -5%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.055) 0%, transparent 65%);
    animation: glowPulse 6s ease-in-out infinite;
}

.home-glow--b {
    bottom: -20%;
    left: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.03) 0%, transparent 65%);
    animation: glowPulse 8s ease-in-out infinite reverse;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* --- Left Column --- */
.left {
    width: 360px;
    min-width: 280px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 44px 0 44px 44px;
    position: relative;
    z-index: 2;
}

.socials {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.social-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--cream);
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUp 0.7s var(--ease) forwards;
    transition: opacity 0.4s ease, border-color 0.4s ease, transform 0.4s var(--ease), box-shadow 0.4s ease;
}

.social-icon:nth-child(1) { animation-delay: 0.6s; }
.social-icon:nth-child(2) { animation-delay: 0.72s; }
.social-icon:nth-child(3) { animation-delay: 0.84s; }

.social-icon:hover {
    opacity: 1;
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.12);
}

.social-icon svg {
    width: 15px;
    height: 15px;
}

.vline {
    width: 1px;
    flex: 1;
    margin: 20px 0;
    margin-left: 16px;
    position: relative;
    overflow: hidden;
}

.vline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--border);
    transform: scaleY(0);
    transform-origin: top;
    animation: scaleIn 1s ease 0.9s forwards;
}

.vline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold-dim), transparent);
    animation: linePulse 3s ease-in-out infinite;
}

@keyframes scaleIn {
    to { transform: scaleY(1); }
}

@keyframes linePulse {
    0%   { top: -40px; opacity: 0; }
    20%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Bio */
.bio {
    margin-top: auto;
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.9s var(--ease) 1s forwards;
}

.bio-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 5px 14px 5px 10px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--cream-dim);
    background: rgba(92, 219, 92, 0.04);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5cdb5c;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(92, 219, 92, 0.5); }
    50%       { opacity: 0.7; box-shadow: 0 0 0 7px rgba(92, 219, 92, 0); }
}

.bio-name {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--cream);
    margin-bottom: 14px;
}

.bio-desc {
    font-family: var(--sans);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--cream-dim);
    max-width: 290px;
    margin-bottom: 12px;
}

.bio-highlight {
    color: var(--cream);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--cream-muted);
    transition: text-decoration-color 0.3s ease;
}

.bio-highlight:hover {
    text-decoration-color: var(--gold-dim);
}

.bio-role {
    font-family: var(--sans);
    font-size: 0.82rem;
    color: var(--cream-muted);
    font-style: italic;
    letter-spacing: 0.02em;
}

.copy {
    position: absolute;
    bottom: 44px;
    left: 14px;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: var(--cream-muted);
    writing-mode: vertical-rl;
    opacity: 0;
    animation: fadeIn 0.6s ease 1.2s forwards;
}

/* --- Giant Nav --- */
.giant-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding-right: 60px;
    position: relative;
    z-index: 2;
}

.glink {
    display: block;
    position: relative;
    overflow: hidden;
    line-height: 1;
    transition: opacity 0.5s ease;
}

.glink-text {
    font-family: var(--serif);
    font-size: clamp(5.5rem, 13vw, 15rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--cream);
    display: block;
    line-height: 0.88;
    transition: transform 0.7s var(--ease), color 0.4s ease;
    opacity: 0;
    transform: translateY(110%);
    animation: slideUp 1.1s var(--ease) forwards;
}

.glink:nth-child(1) .glink-text { animation-delay: 0.3s; }
.glink:nth-child(2) .glink-text { animation-delay: 0.45s; }
.glink:nth-child(3) .glink-text { animation-delay: 0.6s; }

.glink::after {
    content: attr(data-hover);
    position: absolute;
    right: 0;
    bottom: 8px;
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dim);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.5s var(--ease);
    pointer-events: none;
}

.glink:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.giant-nav:hover .glink {
    opacity: 0.2;
}

.giant-nav:hover .glink:hover {
    opacity: 1;
}

.glink:hover .glink-text {
    transform: translateX(-24px);
    color: var(--cream);
}

/* Time widget */
.time-widget {
    position: absolute;
    top: 44px;
    right: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 0.6s ease 1.2s forwards;
}

.time-label {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cream-muted);
}

.time-value {
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--cream-dim);
    font-variant-numeric: tabular-nums;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 0.6s ease 1.8s forwards;
    pointer-events: none;
}

.scroll-hint-mouse {
    width: 20px;
    height: 32px;
    border: 1.5px solid var(--border-hover);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.scroll-hint-wheel {
    width: 3px;
    height: 6px;
    background: var(--cream-dim);
    border-radius: 2px;
    animation: wheelScroll 2s ease-in-out infinite;
}

@keyframes wheelScroll {
    0%   { opacity: 1; transform: translateY(0); }
    50%  { opacity: 0.3; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.scroll-hint-label {
    font-size: 0.52rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cream-muted);
}

/* ===== Marquee Strip ===== */
.marquee-strip {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    background: var(--bg-light);
    cursor: default;
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    animation: marqueeScroll 35s linear infinite;
    white-space: nowrap;
}

.marquee-strip:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cream-muted);
    padding: 0 28px;
    transition: color 0.3s ease;
}

.marquee-sep {
    color: var(--gold);
    opacity: 0.55;
    font-size: 0.55rem;
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* =============================================
   PAGES
   ============================================= */
.page {
    width: 100vw;
    min-height: 100vh;
    background: var(--bg);
    padding: 60px 80px 100px;
    display: flex;
    position: relative;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(237, 228, 206, 0.018) 1px, transparent 0);
    background-size: 44px 44px;
}

.page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
    pointer-events: none;
}

.page-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.page-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.back {
    font-family: var(--sans);
    font-size: 0.82rem;
    color: var(--cream-muted);
    letter-spacing: 0.05em;
    transition: color 0.3s ease, transform 0.3s var(--ease);
    display: inline-block;
}

.back:hover {
    color: var(--cream);
    transform: translateX(-4px);
}

.page-count {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cream-muted);
    padding: 4px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
}

.ptitle {
    font-family: var(--serif);
    font-size: clamp(4.5rem, 11vw, 12rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 24px;
    color: var(--cream);
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s var(--ease) 0.1s forwards;
}

.page-intro {
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--cream-dim);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 80px;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.3s forwards;
}

/* =============================================
   PROJECTS
   ============================================= */
.projects {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.proj {
    display: block;
    padding: 72px 0;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.9s var(--ease);
    position: relative;
    overflow: hidden;
}

.proj:last-child {
    border-bottom: none;
}

.proj.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ghosted index number behind each project */
.proj::before {
    content: attr(data-index);
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    font-family: var(--serif);
    font-size: 16rem;
    font-weight: 700;
    color: var(--cream);
    opacity: 0.018;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    letter-spacing: -0.05em;
    transition: opacity 0.5s ease;
}

.proj:hover::before {
    opacity: 0.04;
}

/* Project link — 2-col grid layout */
.proj-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
    color: inherit;
    text-decoration: none;
}

/* Alternating layout for even projects */
.proj:nth-child(even) .proj-visual {
    order: 2;
}
.proj:nth-child(even) .proj-body {
    order: 1;
}

/* Project Visual */
.proj-visual {
    aspect-ratio: 3/2;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    transition: border-color 0.5s ease, transform 0.7s var(--ease), box-shadow 0.5s ease;
}

.proj:hover .proj-visual {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 162, 39, 0.08);
}

/* Dot grid overlay on visuals */
.proj-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
    background-size: 28px 28px;
    z-index: 1;
    pointer-events: none;
}

.proj-visual-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

/* Project visual backgrounds */
.proj-visual.healthaxis {
    background: #091724;
}
.proj-visual.healthaxis::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(9,23,36,0.1) 0%, rgba(9,23,36,0.55) 100%);
    z-index: 2;
    pointer-events: none;
}

.proj-visual.ecommerce {
    background: #170c28;
}
.proj-visual.ecommerce::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(23,12,40,0.1) 0%, rgba(23,12,40,0.55) 100%);
    z-index: 2;
    pointer-events: none;
}

.proj-visual.saas {
    background: #07181e;
}
.proj-visual.saas::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(7,24,30,0.1) 0%, rgba(7,24,30,0.55) 100%);
    z-index: 2;
    pointer-events: none;
}

.proj-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.09);
    transition: transform 0.4s var(--ease), background 0.4s ease;
}

.proj:hover .proj-icon {
    transform: scale(1.05);
    background: rgba(255,255,255,0.09);
}

.proj-icon svg {
    width: 28px;
    height: 28px;
    color: var(--cream-dim);
}

.proj-visual-label {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cream-muted);
}

.proj-visual-year {
    position: absolute;
    bottom: 16px;
    right: 18px;
    font-family: var(--serif);
    font-size: 0.75rem;
    color: var(--cream-muted);
    font-style: italic;
    z-index: 3;
}

/* Screenshot image inside project visual */
.proj-screenshot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.7s var(--ease), opacity 0.4s ease;
    opacity: 0.88;
}
.proj:hover .proj-screenshot {
    transform: scale(1.04);
    opacity: 1;
}

/* Project Body */
.proj-body {
    display: flex;
    flex-direction: column;
}

.proj-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.proj-num {
    font-family: var(--serif);
    font-size: 0.85rem;
    color: var(--gold-dim);
    font-style: italic;
}

.proj-tag {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cream-dim);
    padding: 4px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
}

.proj-name {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.05;
    transition: color 0.4s ease;
    color: var(--cream);
}

.proj:hover .proj-name {
    color: var(--gold);
}

.proj-desc {
    font-family: var(--sans);
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--cream-dim);
    margin-bottom: 20px;
}

.proj-features {
    list-style: none;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.proj-features li {
    font-size: 0.82rem;
    color: var(--cream-dim);
    line-height: 1.6;
    padding-left: 18px;
    position: relative;
}

.proj-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--gold-dim);
    font-size: 0.75rem;
}

.proj-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.proj-stack span {
    font-size: 0.66rem;
    letter-spacing: 0.07em;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--cream-muted);
    transition: all 0.35s ease;
}

.proj-stack span:hover {
    color: var(--cream);
    border-color: var(--border-hover);
    background: var(--cream-faint);
}

.proj-view {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--cream-dim);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease, gap 0.3s var(--ease);
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    align-self: flex-start;
}

.proj:hover .proj-view {
    color: var(--cream);
    border-bottom-color: var(--border-hover);
    gap: 10px;
}

.proj-arrow {
    display: inline-block;
    transition: transform 0.4s var(--ease);
}

.proj:hover .proj-arrow {
    transform: translateX(4px);
}

/* =============================================
   ABOUT
   ============================================= */
.about-hero {
    margin-bottom: 80px;
    max-width: 820px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease);
}

.about-hero.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-big {
    font-family: var(--serif);
    font-size: clamp(1.45rem, 2.6vw, 2.1rem);
    line-height: 1.55;
    color: var(--cream);
    font-weight: 400;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease);
}

.about-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-block {
    margin-bottom: 48px;
}

.about-label {
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.about-p {
    font-family: var(--sans);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--cream-dim);
    margin-bottom: 14px;
}

.edu-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.edu-degree {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--cream);
}

.edu-school {
    font-size: 0.85rem;
    color: var(--cream-dim);
}

/* Skills */
.skill-section {
    margin-bottom: 20px;
}

.skill-section h4 {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream-muted);
    margin-bottom: 10px;
    font-weight: 400;
}

.stags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stags span {
    font-size: 0.78rem;
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--cream-dim);
    transition: all 0.35s ease;
}

.stags span:hover {
    color: var(--cream);
    border-color: rgba(201, 162, 39, 0.35);
    background: var(--gold-glow);
    transform: translateY(-2px);
}

/* Stats */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease);
}

.stats-bar.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat {
    text-align: center;
}

.stat-num {
    font-family: var(--serif);
    font-size: 3.4rem;
    font-weight: 400;
    color: var(--gold);
    display: block;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 40px rgba(201, 162, 39, 0.25);
}

.stat-num::after {
    content: '+';
    font-size: 1.6rem;
    color: var(--gold-dim);
}

.stat-label {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cream-muted);
}

/* =============================================
   CONTACT
   ============================================= */
#contact {
    overflow: hidden;
}

.contact-bg-text {
    position: absolute;
    bottom: -20px;
    right: -30px;
    font-family: var(--serif);
    font-size: clamp(8rem, 20vw, 22rem);
    font-weight: 800;
    color: var(--cream);
    opacity: 0.022;
    line-height: 1;
    letter-spacing: -0.04em;
    pointer-events: none;
    user-select: none;
}

.contact-inner {
    max-width: 700px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease);
}

.contact-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-lead {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.6;
    color: var(--cream);
    margin-bottom: 40px;
    font-weight: 400;
}

.contact-email {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2.8vw, 2.3rem);
    font-weight: 400;
    color: var(--cream);
    display: inline-block;
    margin-bottom: 52px;
    position: relative;
    padding-bottom: 6px;
    transition: color 0.3s ease;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--cream-muted);
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.contact-email:hover {
    color: var(--gold);
}

.contact-email:hover::after {
    background: var(--gold);
    box-shadow: 0 0 10px rgba(201, 162, 39, 0.4);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.contact-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s var(--ease);
}

.contact-card:hover {
    border-color: var(--border-hover);
    background: var(--cream-faint);
    transform: translateY(-3px);
}

.contact-card-label {
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-dim);
}

.contact-card-link {
    font-size: 0.82rem;
    color: var(--cream-dim);
    transition: color 0.3s ease;
    word-break: break-all;
}

.contact-card-link:hover {
    color: var(--cream);
}

.contact-card-value {
    font-size: 0.88rem;
    color: var(--cream-dim);
}

/* =============================================
   DETAIL PAGES (healthaxis / aerolith / nexus)
   ============================================= */
.detail-page {
    width: 100vw;
    min-height: 100vh;
    background: var(--bg);
    padding: 60px 80px 120px;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(237, 228, 206, 0.018) 1px, transparent 0);
    background-size: 44px 44px;
}

.detail-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Detail Nav */
.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.detail-num {
    font-family: var(--serif);
    font-size: 0.85rem;
    color: var(--cream-muted);
    font-style: italic;
    letter-spacing: 0.06em;
}

/* Detail Hero */
.detail-hero {
    margin-bottom: 56px;
}

.detail-tag {
    display: inline-block;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-dim);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 100px;
    padding: 5px 16px;
    margin-bottom: 20px;
}

.detail-title {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--cream);
    margin-bottom: 20px;
}

.detail-subtitle {
    font-family: var(--serif);
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    line-height: 1.65;
    color: var(--cream-dim);
    max-width: 720px;
    font-weight: 400;
}

/* Detail Banner */
.detail-banner {
    width: 100%;
    aspect-ratio: 21/9;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    margin-bottom: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
    background-size: 28px 28px;
    z-index: 1;
}

.detail-banner.healthaxis {
    background: linear-gradient(145deg, #091724 0%, #0f2a42 55%, #0b1e31 100%);
}
.detail-banner.healthaxis::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 35% 55%, rgba(50, 140, 220, 0.18) 0%, transparent 60%);
    z-index: 1;
}

.detail-banner.ecommerce {
    background: linear-gradient(145deg, #170c28 0%, #271540 55%, #1e1135 100%);
}
.detail-banner.ecommerce::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 65% 40%, rgba(140, 70, 220, 0.18) 0%, transparent 60%);
    z-index: 1;
}

.detail-banner.saas {
    background: linear-gradient(145deg, #07181e 0%, #0e2a35 55%, #091e28 100%);
}
.detail-banner.saas::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(40, 175, 140, 0.18) 0%, transparent 60%);
    z-index: 1;
}

.detail-banner-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.detail-banner-inner svg {
    width: 72px;
    height: 72px;
    color: var(--cream-dim);
    background: rgba(255,255,255,0.06);
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.09);
    backdrop-filter: blur(10px);
}

.detail-banner-inner span {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cream-muted);
}

/* Meta row */
.detail-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 72px;
}

.detail-meta-item {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-right: 1px solid var(--border);
    transition: background 0.3s ease;
}

.detail-meta-item:last-child {
    border-right: none;
}

.detail-meta-item:hover {
    background: var(--cream-faint);
}

.detail-meta-label {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dim);
}

.detail-meta-value {
    font-size: 0.88rem;
    color: var(--cream-dim);
    font-family: var(--sans);
    line-height: 1.4;
}

/* Sections */
.detail-section {
    margin-bottom: 72px;
}

.detail-section-title {
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.detail-text p {
    font-family: var(--sans);
    font-size: 0.97rem;
    line-height: 1.85;
    color: var(--cream-dim);
    margin-bottom: 16px;
}

.detail-text p:last-child { margin-bottom: 0; }

.detail-text strong {
    color: var(--cream);
    font-weight: 500;
}

/* Features grid */
.detail-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-feature-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    transition: border-color 0.35s ease, transform 0.35s var(--ease), box-shadow 0.35s ease;
}

.detail-feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.detail-feature-num {
    font-family: var(--serif);
    font-size: 0.8rem;
    color: var(--gold-dim);
    font-style: italic;
    display: block;
    margin-bottom: 12px;
}

.detail-feature-card h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--cream);
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 1.3;
}

.detail-feature-card p {
    font-size: 0.85rem;
    color: var(--cream-dim);
    line-height: 1.7;
}

/* Stack grid */
.detail-stack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.detail-stack-group h4 {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream-muted);
    margin-bottom: 12px;
    font-weight: 400;
}

/* Challenges */
.detail-challenges {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-challenge {
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.detail-challenge:last-child { border-bottom: none; }

.detail-challenge h3 {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--cream);
    margin-bottom: 10px;
    font-weight: 400;
}

.detail-challenge p {
    font-size: 0.9rem;
    color: var(--cream-dim);
    line-height: 1.75;
    max-width: 700px;
}

/* Bottom nav */
.detail-bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 60px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.detail-bottom-link {
    font-size: 0.85rem;
    color: var(--cream-muted);
    letter-spacing: 0.04em;
    transition: color 0.3s ease, transform 0.3s var(--ease);
    display: inline-block;
}

.detail-bottom-link:hover {
    color: var(--cream);
    transform: translateX(4px);
}

.detail-bottom-link:first-child:hover {
    transform: translateX(-4px);
}

/* Detail responsive */
@media (max-width: 768px) {
    .detail-page { padding: 40px 28px 80px; }

    .detail-meta {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-meta-item:nth-child(2) { border-right: none; }
    .detail-meta-item:nth-child(1),
    .detail-meta-item:nth-child(2) { border-bottom: 1px solid var(--border); }

    .detail-features-grid { grid-template-columns: 1fr; }
    .detail-stack-grid    { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
    .detail-page { padding: 28px 20px 60px; }
    .detail-meta { grid-template-columns: 1fr; }
    .detail-meta-item { border-right: none; border-bottom: 1px solid var(--border); }
    .detail-meta-item:last-child { border-bottom: none; }
    .detail-title { font-size: 3rem; }
}

/* =============================================
   KEYFRAMES
   ============================================= */
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .proj-link {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .proj:nth-child(even) .proj-visual,
    .proj:nth-child(even) .proj-body {
        order: unset;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 900px) {
    .home {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .left {
        width: 100%;
        height: auto;
        padding: 28px 28px 0;
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        flex-wrap: wrap;
    }

    .socials { flex-direction: row; }
    .vline { display: none; }

    .bio {
        width: 100%;
        margin-top: 20px;
    }

    .copy {
        position: static;
        writing-mode: horizontal-tb;
        margin-top: 12px;
    }

    .giant-nav {
        padding: 40px 28px 80px;
        align-items: flex-start;
    }

    .glink-text {
        font-size: clamp(3.5rem, 16vw, 8rem);
    }

    .glink::after { display: none; }

    .page {
        padding: 40px 28px 80px;
    }

    .time-widget {
        top: 28px;
        right: 28px;
    }

    .float-nav { display: none; }

    .proj::before { display: none; }
}

@media (max-width: 500px) {
    .left { padding: 20px; }
    .giant-nav { padding: 30px 20px 60px; }

    .glink-text {
        font-size: clamp(2.8rem, 20vw, 5.5rem);
    }

    .page { padding: 28px 20px 60px; }

    .ptitle { margin-bottom: 16px; }
    .page-intro { margin-bottom: 40px; }

    .proj { padding: 44px 0; }
    .proj-name { font-size: 2rem; }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .about-big {
        font-size: 1.3rem;
    }

    .contact-email {
        font-size: 1.3rem;
    }

    .contact-bg-text { display: none; }
}
