/* ================================================================
   PROFESSIONAL DESIGN SYSTEM — Kemal Personal Site
   ================================================================ */

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

:root {
    --bg-primary: #06060b;
    --bg-secondary: #0c0c14;
    --bg-tertiary: #10101c;
    --bg-card: rgba(18, 18, 35, 0.6);
    --bg-card-solid: #121223;
    --bg-card-hover: rgba(26, 26, 50, 0.8);
    --bg-glass: rgba(12, 12, 20, 0.7);
    --color-primary: #e94560;
    --color-primary-light: #ff6b81;
    --color-primary-dark: #c23152;
    --color-secondary: #0f3460;
    --color-accent: #533483;
    --color-cyan: #00d2ff;
    --color-text: #eaeaf0;
    --color-text-muted: #8892a4;
    --color-text-dim: #505868;
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-hover: rgba(233, 69, 96, 0.25);
    --color-link: #64b5f6;
    --color-star: #ffd700;
    --font-sans: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 1200px;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(233, 69, 96, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition: all 0.4s var(--ease-out);
    --transition-fast: all 0.25s var(--ease-out);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-dark) var(--bg-primary);
}

html::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-track { background: var(--bg-primary); }
html::-webkit-scrollbar-thumb { background: var(--color-primary-dark); border-radius: 3px; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--color-text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: rgba(233, 69, 96, 0.3);
    color: #fff;
}

/* ==================== PAGE TRANSITION ==================== */
.page-transition {
    animation: pageIn 0.6s var(--ease-out) both;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== SCROLL REVEAL ==================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.08s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.08s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.16s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.24s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.32s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.40s; }
.stagger-children > *:nth-child(8) { transition-delay: 0.48s; }
.stagger-children > *:nth-child(9) { transition-delay: 0.56s; }

/* ==================== LAYOUT ==================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 800px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 0 24px;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.navbar.scrolled {
    background: rgba(6, 6, 11, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 1px 0 var(--color-border), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    transition: height 0.4s ease;
}

.navbar.scrolled .nav-container {
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.3rem;
    z-index: 10;
}

.brand-icon {
    display: flex;
    align-items: center;
    transition: transform 0.5s var(--ease-bounce);
}

.nav-brand:hover .brand-icon {
    transform: rotate(30deg) scale(1.1);
}

.brand-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light), var(--color-cyan));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-links > li > a {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

.nav-links > li > a::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out);
    border-radius: 1px;
}

.nav-links > li > a:hover::before,
.nav-links > li > a.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-links > li > a:hover {
    color: var(--color-text);
}

.nav-links > li > a.active {
    color: var(--color-primary);
}

.arrow {
    font-size: 0.65rem;
    transition: transform 0.3s var(--ease-out);
    display: inline-block;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(18, 18, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s var(--ease-out);
    list-style: none;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.dropdown-menu li a:hover {
    background: rgba(233, 69, 96, 0.1);
    color: var(--color-text);
    padding-left: 20px;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.4s var(--ease-out);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(5.5px) translateX(5.5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-5.5px) translateX(5.5px);
}

/* ==================== HERO ==================== */
.hero {
    padding: 160px 24px 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== SPLIT-SCREEN HERO ==================== */
.split-hero {
    padding: 0;
    cursor: none;
}

.split-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Tech layer (base) - dark digital theme */
.split-layer-tech {
    z-index: 0;
    background: #060612;
}

.matrix-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

.formula-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-formula {
    position: absolute;
    bottom: -2rem;
    color: rgba(0, 230, 118, 0.2);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    animation: floatUp linear forwards;
    pointer-events: none;
}

@keyframes floatUp {
    from { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    to { transform: translateY(-100vh); opacity: 0; }
}

/* Literature layer (clip-path masked) - warm paper theme */
.split-layer-lit {
    z-index: 1;
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.02s linear;
}

.paper-texture {
    position: absolute;
    inset: 0;
    background: #f5f0e8;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            rgba(180, 160, 130, 0.12) 28px,
            rgba(180, 160, 130, 0.12) 29px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 28px,
            rgba(180, 160, 130, 0.06) 28px,
            rgba(180, 160, 130, 0.06) 29px
        );
}

.paper-texture::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(200, 180, 140, 0.15), transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(180, 160, 120, 0.1), transparent 50%);
}

/* Face images */
.split-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 420px;
    pointer-events: none;
}

.face-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 4px;
}

/* Sketch style for literature side */
.face-lit-img {
    filter: grayscale(1) contrast(1.3) brightness(1.1);
    mix-blend-mode: multiply;
    opacity: 0.85;
}

/* Digital style for tech side */
.face-tech-img {
    filter: brightness(0.9) saturate(0.6) hue-rotate(120deg) contrast(1.2);
    mix-blend-mode: lighten;
    opacity: 0.7;
}

.split-face-tech::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 230, 118, 0.06) 2px,
            rgba(0, 230, 118, 0.06) 4px
        );
    border-radius: 4px;
    pointer-events: none;
}

/* Split line */
.split-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent,
        rgba(233, 69, 96, 0.6) 20%,
        rgba(233, 69, 96, 0.9) 50%,
        rgba(233, 69, 96, 0.6) 80%,
        transparent
    );
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.4), 0 0 30px rgba(233, 69, 96, 0.2);
}

/* Hero content sits above split layers */
.split-content {
    position: relative;
    z-index: 10;
    cursor: auto;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.split-content .hero-subtitle {
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* Override pseudo-elements when split is active */
.split-hero::before,
.split-hero::after {
    display: none;
}

/* ==================== END SPLIT-SCREEN ==================== */

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    margin: 0 auto;
    animation: heroEnter 1s var(--ease-out) both;
}

@keyframes heroEnter {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-greeting {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: heroEnter 1s var(--ease-out) 0.15s both;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.15;
    letter-spacing: -1.5px;
    animation: heroEnter 1s var(--ease-out) 0.25s both;
}

.highlight {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light), #ff9a9e);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    position: relative;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 44px;
    line-height: 1.9;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    animation: heroEnter 1s var(--ease-out) 0.35s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroEnter 1s var(--ease-out) 0.45s both;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(233, 69, 96, 0.08);
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(83, 52, 131, 0.08);
    top: 30%;
    right: -5%;
    animation-delay: -3s;
}

.hero-orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(0, 210, 255, 0.05);
    bottom: 10%;
    left: 30%;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.05); }
    50% { transform: translate(-15px, 15px) scale(0.95); }
    75% { transform: translate(25px, 20px) scale(1.02); }
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 60px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(233, 69, 96, 0.4);
}

.btn-primary span,
.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px);
    background: rgba(233, 69, 96, 0.06);
    box-shadow: 0 8px 32px rgba(233, 69, 96, 0.1);
}

/* ==================== SECTIONS ==================== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-alt {
    background: var(--bg-secondary);
    position: relative;
}

.section-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 2px;
    margin-top: 12px;
}

.section-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
}

.section-link:hover {
    color: var(--color-primary-light);
    border-bottom-color: var(--color-primary-light);
    gap: 10px;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    padding: 140px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 30%, rgba(233, 69, 96, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 30% 70%, rgba(83, 52, 131, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
    position: relative;
    animation: heroEnter 0.8s var(--ease-out) both;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    animation: heroEnter 0.8s var(--ease-out) 0.1s both;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 60px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1), rgba(233, 69, 96, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.filter-btn:hover::before {
    opacity: 1;
}

.filter-btn:hover {
    border-color: var(--color-border-hover);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
}

.filter-btn.active::before { display: none; }

/* ==================== TAB BAR ==================== */
.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    justify-content: center;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.tab-btn {
    padding: 16px 40px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    cursor: pointer;
    letter-spacing: 0.3px;
    position: relative;
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--color-primary);
}

/* ==================== DEEP DIVE BADGE ==================== */
.deep-dive-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(0, 210, 255, 0.1);
    color: var(--color-cyan);
    border: 1px solid rgba(0, 210, 255, 0.15);
}

/* ==================== REVIEW RATING BOX ==================== */
.review-rating-box {
    margin-top: 56px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.review-rating-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-star), var(--color-primary-light));
}

.rating-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.rating-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 20px;
}

.rating-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-star);
    line-height: 1;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
}

.rating-max {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-text-dim);
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.rating-star {
    font-size: 1.5rem;
    color: var(--color-text-dim);
    opacity: 0.2;
    transition: all 0.3s var(--ease-out);
}

.rating-star.filled {
    color: var(--color-star);
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
    animation: starPop 0.5s var(--ease-bounce) both;
}

@keyframes starPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.rating-star.filled:nth-child(1) { animation-delay: 0.05s; }
.rating-star.filled:nth-child(2) { animation-delay: 0.1s; }
.rating-star.filled:nth-child(3) { animation-delay: 0.15s; }
.rating-star.filled:nth-child(4) { animation-delay: 0.2s; }
.rating-star.filled:nth-child(5) { animation-delay: 0.25s; }
.rating-star.filled:nth-child(6) { animation-delay: 0.3s; }
.rating-star.filled:nth-child(7) { animation-delay: 0.35s; }
.rating-star.filled:nth-child(8) { animation-delay: 0.4s; }
.rating-star.filled:nth-child(9) { animation-delay: 0.45s; }
.rating-star.filled:nth-child(10) { animation-delay: 0.5s; }

/* ==================== CARDS ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 28px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.5s var(--ease-out);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(233, 69, 96, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1), transparent 40%, transparent 60%, rgba(83, 52, 131, 0.08));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.card:hover {
    border-color: var(--color-border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    box-shadow: var(--shadow), var(--shadow-glow);
}

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

.card:hover::after {
    opacity: 1;
}

.card-badge-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.card-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(233, 69, 96, 0.12);
    color: var(--color-primary-light);
    margin-bottom: 18px;
    border: 1px solid rgba(233, 69, 96, 0.1);
}

.card-badge-group .card-badge {
    margin-bottom: 0;
}

.card-rating {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-star);
    display: flex;
    align-items: center;
    gap: 5px;
}

.star {
    font-size: 1rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.card-title a {
    transition: var(--transition-fast);
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-text {
    font-size: 0.93rem;
    color: var(--color-text-muted);
    line-height: 1.75;
    flex: 1;
    margin-bottom: 24px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.card-date {
    font-size: 0.82rem;
    color: var(--color-text-dim);
    font-weight: 500;
}

.card-read-more {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.card-read-more:hover {
    color: var(--color-primary-light);
    gap: 8px;
}

/* ==================== POEM CARDS ==================== */
.poem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.poem-card {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.5s var(--ease-out);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.poem-card::before {
    content: '\201C';
    position: absolute;
    top: -5px;
    right: 24px;
    font-size: 7rem;
    font-family: var(--font-serif);
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1), rgba(83, 52, 131, 0.06));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    pointer-events: none;
    line-height: 1;
}

.poem-card:hover {
    border-color: var(--color-border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    box-shadow: var(--shadow), var(--shadow-glow);
}

.poem-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.poem-title a:hover {
    color: var(--color-primary);
}

.poem-excerpt,
.poem-content-preview {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 2;
    font-style: italic;
    margin-bottom: 24px;
}

.poem-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 700px;
    margin: 0 auto;
}

.poem-card-full {
    text-align: center;
}

.poem-card-full .poem-content-preview {
    max-width: 500px;
    margin: 0 auto 24px;
}

.poem-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

/* ==================== ARTICLE PAGE ==================== */
.article-page {
    padding: 120px 0 100px;
    animation: pageIn 0.6s var(--ease-out) both;
}

.article-header {
    margin-bottom: 48px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.back-link:hover {
    color: var(--color-primary);
    background: rgba(233, 69, 96, 0.06);
    gap: 10px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-meta .card-badge {
    margin-bottom: 0;
}

.article-date {
    font-size: 0.88rem;
    color: var(--color-text-dim);
    font-weight: 500;
}

.article-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.article-summary {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    line-height: 1.85;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--color-border);
}

.article-content {
    font-size: 1.08rem;
    line-height: 1.95;
    color: var(--color-text);
}

.article-content p {
    margin-bottom: 24px;
}

/* ==================== POEM DETAIL ==================== */
.poem-page .article-header {
    text-align: center;
}

.poem-detail-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--color-text), var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.poem-full-content {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 2.4;
    text-align: center;
    color: var(--color-text);
    font-style: italic;
    padding: 48px 0;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.poem-full-content::before,
.poem-full-content::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    margin: 0 auto 48px;
}

.poem-full-content::after {
    margin: 48px auto 0;
}

/* ==================== ABOUT PAGE ==================== */
.about-content {
    padding: 20px 0;
}

.about-intro {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 72px;
}

.avatar-placeholder {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-secondary));
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 40px rgba(233, 69, 96, 0.2);
    position: relative;
}

.avatar-placeholder::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(233, 69, 96, 0.2);
    animation: pulseRing 3s ease-in-out infinite;
}

@keyframes pulseRing {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.3; }
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.85;
}

.about-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 72px;
}

.about-section {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.5s var(--ease-out);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

.about-section:hover::before {
    transform: scaleX(1);
}

.about-section:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow), var(--shadow-glow);
}

.about-section h3 {
    font-size: 1.2rem;
    margin-bottom: 14px;
    font-weight: 700;
}

.about-section p {
    color: var(--color-text-muted);
    font-size: 0.93rem;
    line-height: 1.75;
}

.about-links {
    text-align: center;
}

.about-links h3 {
    font-size: 1.6rem;
    margin-bottom: 28px;
    font-weight: 700;
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    padding: 14px 32px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.93rem;
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.social-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.15);
}

.social-link:hover::before {
    opacity: 1;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.empty-state p {
    opacity: 0.7;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-secondary);
    padding: 72px 24px 0;
    position: relative;
    overflow: hidden;
}

.footer-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(233, 69, 96, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), var(--color-primary-light), transparent);
    background-size: 300% 100%;
    animation: footerLine 6s linear infinite;
}

@keyframes footerLine {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-brand span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-about p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 320px;
}

.footer-section h3 {
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0;
    transition: var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--color-primary);
    gap: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--color-text-dim);
    font-size: 0.83rem;
    letter-spacing: 0.3px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(6, 6, 11, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: 100px 32px 40px;
        gap: 4px;
        z-index: 5;
    }

    .nav-links.active {
        display: flex;
        animation: mobileMenuIn 0.4s var(--ease-out) both;
    }

    @keyframes mobileMenuIn {
        from { opacity: 0; clip-path: circle(0% at top right); }
        to { opacity: 1; clip-path: circle(150% at top right); }
    }

    .nav-links > li > a {
        padding: 14px 16px;
        width: 100%;
        font-size: 1.1rem;
    }

    .nav-links > li > a::before {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0 20px;
        backdrop-filter: none;
    }

    .hero {
        padding: 120px 24px 80px;
        min-height: auto;
    }

    .split-hero {
        min-height: 100vh;
        padding: 0;
    }

    .split-face {
        width: 200px;
        height: 260px;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 60px 0;
    }

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

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

    .page-title {
        font-size: 2rem;
    }

    .page-header {
        padding: 110px 24px 40px;
    }

    .article-page {
        padding: 90px 0 60px;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .poem-detail-title {
        font-size: 1.8rem;
    }

    .about-intro {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }

    .about-sections {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .filter-bar {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.83rem;
    }

    .tab-btn {
        padding: 14px 28px;
        font-size: 0.9rem;
    }

    .review-rating-box {
        padding: 28px;
        margin-top: 40px;
    }

    .rating-number {
        font-size: 2.5rem;
    }

    .hero-orb { display: none; }

    .split-face {
        width: 160px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 24px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Subtle grain texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    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");
}

/* ==================== PORTFOLIO — TECH GRID ==================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.tech-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
    transition: var(--transition);
    cursor: default;
}

.tech-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.tech-icon {
    font-size: 2rem;
    line-height: 1;
}

.tech-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}

/* ==================== PROJECT CARDS ==================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-cyan));
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

.project-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

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

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-icon {
    color: var(--color-primary);
    opacity: 0.8;
}

.project-links {
    display: flex;
    gap: 10px;
}

.project-ext-link {
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    padding: 4px;
}

.project-ext-link:hover {
    color: var(--color-primary-light);
    transform: translateY(-2px);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.project-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition-fast);
}

.project-title a:hover {
    color: var(--color-primary-light);
}

.project-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
}

.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tech-tag {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-cyan);
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ==================== PROJECT DETAIL META ==================== */
.project-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.project-detail-links {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ==================== HORIZONTAL SCROLL ROW ==================== */
.scroll-row {
    position: relative;
    margin-top: 24px;
}

.scroll-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 4px 16px;
}

.scroll-track::-webkit-scrollbar {
    display: none;
}

.scroll-card {
    min-width: 320px;
    max-width: 360px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    color: var(--color-text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.scroll-btn-left {
    left: -20px;
}

.scroll-btn-right {
    right: -20px;
}

/* ==================== PAGE SUBTITLE ==================== */
.page-subtitle {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-top: 8px;
}

/* ==================== PORTFOLIO RESPONSIVE ==================== */
@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }

    .tech-card {
        padding: 16px 10px;
    }

    .tech-icon {
        font-size: 1.5rem;
    }

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

    .scroll-btn {
        display: none;
    }

    .scroll-card {
        min-width: 280px;
    }

    .project-detail-links {
        margin-left: 0;
        width: 100%;
    }

    .project-detail-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   ADMIN PANEL STYLES
   ============================================================ */

/* --- Login Page --- */
.admin-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    font-family: 'Space Grotesk', sans-serif;
}

.admin-login-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.admin-login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem;
}

.admin-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-login-header svg {
    margin-bottom: .75rem;
}

.admin-login-header h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 .25rem;
}

.admin-login-header p {
    color: var(--text-muted);
    font-size: .875rem;
    margin: 0;
}

.admin-login-form .admin-field {
    margin-bottom: 1.25rem;
}

.admin-login-form label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: .4rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.admin-login-form input[type="text"],
.admin-login-form input[type="password"] {
    width: 100%;
    padding: .7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .2s;
    box-sizing: border-box;
}

.admin-login-form input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.admin-login-form .btn {
    width: 100%;
    margin-top: .5rem;
}

.admin-alert {
    padding: .75rem 1rem;
    border-radius: .5rem;
    font-size: .875rem;
    margin-bottom: 1.25rem;
}

.admin-alert-error {
    background: rgba(233,69,96,.12);
    border: 1px solid rgba(233,69,96,.3);
    color: #ff6b81;
}

.admin-alert-success {
    background: rgba(0,206,209,.1);
    border: 1px solid rgba(0,206,209,.25);
    color: var(--accent-secondary);
}

.admin-alert-info {
    background: rgba(100,180,255,.1);
    border: 1px solid rgba(100,180,255,.25);
    color: #8ec8ff;
}

/* --- Layout --- */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.admin-sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-nav {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .2s;
}

.admin-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,.03);
}

.admin-nav-link.active {
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    background: rgba(233,69,96,.06);
}

.admin-sidebar-footer {
    padding: .75rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.admin-logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: .9rem;
}

/* --- Main Content --- */
.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

.admin-page-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--text-primary);
}

.admin-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.admin-header-row .admin-page-title {
    margin-bottom: 0;
}

/* --- Stats --- */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: .75rem;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: border-color .2s;
}

.admin-stat-card:hover {
    border-color: var(--accent-primary);
}

.admin-stat-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.admin-stat-info {
    flex: 1;
}

.admin-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: .25rem;
}

.admin-stat-label {
    font-size: .8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.admin-stat-link {
    display: inline-block;
    margin-top: .5rem;
    font-size: .8rem;
    color: var(--accent-primary);
    text-decoration: none;
}

.admin-stat-link:hover {
    text-decoration: underline;
}

/* --- Table --- */
.admin-table-wrap {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: .75rem;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    text-align: left;
    padding: .85rem 1rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.admin-table td {
    padding: .85rem 1rem;
    font-size: .9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.admin-table tbody tr:first-child td {
    border-top: none;
}

.admin-table tbody tr:hover {
    background: rgba(255,255,255,.02);
}

.admin-badge {
    display: inline-block;
    padding: .2rem .6rem;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border-color);
    border-radius: .35rem;
    font-size: .78rem;
    color: var(--text-secondary);
}

.admin-tech-mini {
    font-size: .82rem;
    color: var(--text-muted);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

.admin-btn-edit {
    padding: .3rem .7rem;
    font-size: .8rem;
    border-radius: .35rem;
    text-decoration: none;
    color: var(--accent-secondary);
    border: 1px solid rgba(0,206,209,.25);
    background: rgba(0,206,209,.06);
    transition: all .2s;
    font-family: inherit;
}

.admin-btn-edit:hover {
    background: rgba(0,206,209,.15);
}

.admin-btn-delete {
    padding: .3rem .7rem;
    font-size: .8rem;
    border-radius: .35rem;
    cursor: pointer;
    color: #ff6b81;
    border: 1px solid rgba(233,69,96,.25);
    background: rgba(233,69,96,.06);
    transition: all .2s;
    font-family: inherit;
}

.admin-btn-delete:hover {
    background: rgba(233,69,96,.15);
}

.admin-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem !important;
}

/* --- Form --- */
.admin-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: .75rem;
    padding: 2rem;
    max-width: 720px;
}

.admin-form .admin-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.admin-form label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: .4rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.admin-form label small {
    text-transform: none;
    color: var(--text-muted);
    font-weight: 400;
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: .65rem .9rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: .92rem;
    transition: border-color .2s;
    box-sizing: border-box;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.admin-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.admin-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .8rem center;
    padding-right: 2rem;
}

.admin-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.admin-form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.admin-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: .9rem;
}

.admin-back:hover {
    color: var(--text-primary);
}

/* --- Admin Responsive --- */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 200px;
    }
    .admin-main {
        margin-left: 200px;
        padding: 1.5rem 1rem;
    }
    .admin-field-row {
        grid-template-columns: 1fr;
    }
    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 540px) {
    .admin-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .admin-body {
        flex-direction: column;
    }
    .admin-main {
        margin-left: 0;
        padding: 1.25rem 1rem;
    }
    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
    }
    .admin-nav-link {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: .5rem .75rem;
        font-size: .8rem;
    }
    .admin-nav-link.active {
        border-bottom-color: var(--accent-primary);
        border-left-color: transparent;
    }
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .admin-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: .75rem;
    }
}
