/* ===================================================
   POORNACHANDRA — AI/ML DEVELOPER PORTFOLIO
   Dark Cyber-Tech Aesthetic
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ─── Design Tokens ─── */
:root {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-card-hover: rgba(0, 255, 209, 0.03);

    --cyan: #00FFD1;
    --cyan-dim: #06d6a0;
    --cyan-glow: rgba(0, 255, 209, 0.15);
    --cyan-glow-strong: rgba(0, 255, 209, 0.35);
    --violet: #8B5CF6;
    --violet-glow: rgba(139, 92, 246, 0.15);

    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #475569;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-cyan: rgba(0, 255, 209, 0.2);
    --border-cyan-strong: rgba(0, 255, 209, 0.5);

    --font-heading: 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-pill: 100px;

    --max-width: 1200px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

::selection {
    background: var(--cyan);
    color: var(--bg-primary);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.text-cyan { color: var(--cyan); }
.text-gradient {
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Layout ─── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
    position: relative;
}

/* ─── Animated Background Gradient Orbs ─── */
.bg-orbs {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orbs .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orbs .orb-1 {
    width: 600px; height: 600px;
    background: var(--cyan);
    top: -200px; left: -200px;
    animation-delay: 0s;
}

.bg-orbs .orb-2 {
    width: 500px; height: 500px;
    background: var(--violet);
    bottom: -150px; right: -150px;
    animation-delay: -7s;
    animation-duration: 25s;
}

.bg-orbs .orb-3 {
    width: 400px; height: 400px;
    background: var(--cyan);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.06;
}

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

/* ─── Grid Lines Background ─── */
.grid-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ─── Navbar ─── */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition);
}

.navbar.scrolled {
    padding: 0.7rem 2rem;
    background: rgba(5, 5, 5, 0.95);
    border-bottom-color: var(--border-cyan);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    transition: all var(--transition);
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.logo-icon.dot-grid-logo {
    filter: drop-shadow(0 0 6px var(--cyan-glow));
    animation: gridPulse 3s ease-in-out infinite;
}

.logo-icon.dot-grid-logo:hover {
    filter: drop-shadow(0 0 12px var(--cyan-glow-strong));
}

.logo:hover .logo-icon {
    transform: scale(1.1);
}

.logo-text span {
    color: var(--cyan);
}

.nav-links {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    position: relative;
    transition: color var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--cyan);
    transition: all var(--transition);
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--cyan-glow);
}

.nav-links a:hover {
    color: var(--cyan);
}

.nav-links a:hover::after {
    width: 80%;
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border: 1px solid var(--border-cyan);
    border-radius: var(--radius-sm);
    background: transparent;
    transition: all var(--transition);
}

.hamburger:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--cyan);
    transition: all 0.3s;
}

/* ─── Hero Section ─── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards 0.2s;
}

.hero-label::before {
    content: '';
    width: 30px; height: 1px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan-glow);
}

.hero h1 {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards 0.4s;
}

.hero h1 .highlight {
    color: var(--cyan);
    text-shadow: 0 0 40px var(--cyan-glow);
    display: block;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 550px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards 0.6s;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards 0.8s;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--cyan);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--cyan-glow);
}

.btn-primary:hover {
    background: #33FFE0;
    box-shadow: 0 0 40px var(--cyan-glow-strong);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--border-cyan-strong);
}

.btn-outline:hover {
    background: rgba(0, 255, 209, 0.05);
    border-color: var(--cyan);
    box-shadow: 0 0 20px var(--cyan-glow);
    transform: translateY(-2px);
}

/* ─── Floating Shapes ─── */
.hero-shapes {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border: 1px solid var(--border-cyan);
    opacity: 0.15;
}

.shape-1 {
    width: 300px; height: 300px;
    border-radius: 50%;
    top: 10%; right: 5%;
    animation: shapeDrift 15s ease-in-out infinite;
}

.shape-2 {
    width: 150px; height: 150px;
    top: 60%; right: 15%;
    transform: rotate(45deg);
    animation: shapeDrift 12s ease-in-out infinite reverse;
}

.shape-3 {
    width: 80px; height: 80px;
    border-radius: 50%;
    top: 30%; right: 30%;
    border-color: var(--violet-glow);
    border-width: 2px;
    animation: shapeDrift 18s ease-in-out infinite;
    animation-delay: -5s;
}

.shape-hex {
    width: 200px; height: 200px;
    top: 20%; right: 10%;
    border: none;
    opacity: 0.08;
    animation: shapeRotate 30s linear infinite;
}

.shape-hex::before {
    content: '⬡';
    font-size: 200px;
    color: var(--cyan);
    line-height: 1;
}

@keyframes shapeDrift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-20px, 15px); }
    50% { transform: translate(15px, -20px); }
    75% { transform: translate(-10px, -10px); }
}

@keyframes shapeRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ─── Hero Split Layout ─── */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

@media (max-width: 968px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* ─── Animated Terminal ─── */
.hero-terminal {
    background: #0a0a0d;
    border: 1px solid var(--border-cyan);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px var(--cyan-glow);
    position: relative;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards 0.8s;
}

.terminal-header {
    background: #141418;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
    display: flex;
    gap: 8px;
    margin-right: 1.5rem;
}

.dot {
    width: 12px; height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 2rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    position: relative;
}

.terminal-line { margin-bottom: 0.2rem; }
.t-indent { padding-left: 2rem; }
.t-indent-2 { padding-left: 4rem; }

/* Syntax Highlighting */
.t-comment { color: var(--text-muted); font-style: italic; }
.t-keyword { color: var(--violet); }
.t-module { color: #f9ba26; }
.t-class { color: var(--cyan); }
.t-func { color: #4dc2ff; }
.t-attr { color: #e5e5e5; }
.t-string { color: #c3e88d; }
.t-number { color: #f78c6c; }
.t-self { color: var(--violet); }
.t-paren { color: #89ddff; }
.t-colon { color: #89ddff; }
.t-output { color: var(--cyan); text-shadow: 0 0 10px var(--cyan-glow); }

/* Scanline Effect */
.terminal-scanline {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 209, 0.1), transparent);
    animation: terminalScan 4s linear infinite;
    pointer-events: none;
}

@keyframes terminalScan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(500px); }
}

/* ─── Section Headers ─── */
.section-header {
    margin-bottom: 4rem;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-label::before {
    content: '//';
    opacity: 0.5;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
}

.section-title .accent {
    color: var(--cyan);
    text-shadow: 0 0 30px var(--cyan-glow);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 1rem;
    max-width: 600px;
}

/* ─── Expertise Cards (Data Pipeline, Model Training, Deployment) ─── */
.expertise-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.expertise-card {
    background: #0a0a0d; /* Opaque background */
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    width: min(100%, 340px);
    
    /* Scattered Gambling Card Effect */
    position: relative;
    z-index: 1;
    transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg));
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0,255,209,0.02);
}

/* Pseudo-random scatter patterns */
.expertise-card:nth-child(1) { --r: -4deg; --x: 10px; --y: 15px; z-index: 1; }
.expertise-card:nth-child(2) { --r: 2deg; --x: -15px; --y: -5px; z-index: 2; }
.expertise-card:nth-child(3) { --r: -3deg; --x: 5px; --y: 10px; z-index: 3; }

.expertise-card:hover {
    z-index: 100 !important;
    transform: translate(0, -20px) scale(1.05) rotate(0deg);
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

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

.expertise-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 209, 0.05);
    border: 1px solid var(--border-cyan);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: var(--cyan);
    box-shadow: inset 0 0 20px rgba(0, 255, 209, 0.02);
    transition: all var(--transition);
}



.expertise-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.expertise-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.expertise-list {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.expertise-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.expertise-list li::before {
    content: '→';
    color: var(--cyan);
    font-family: var(--font-mono);
}

/* ─── Project Cards ─── */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
    padding: 3rem 0;
    gap: 2.5rem;
}

.project-card {
    background: #0a0a0d; /* Opaque background to hide under-layers */
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    min-height: 250px;
    width: min(100%, 340px);

    /* Scattered Gambling Card Effect */
    position: relative;
    z-index: 1;
    margin: 1rem 0; /* Even spacing horizontally and vertically */
    transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg));
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0,255,209,0.02);
}

/* Pseudo-random scatter patterns for up to 10 cards */
.project-card:nth-child(1) { --r: -6deg; --x: 10px; --y: 20px; z-index: 2; }
.project-card:nth-child(2) { --r: 4deg; --x: -15px; --y: -10px; z-index: 1; }
.project-card:nth-child(3) { --r: -3deg; --x: 5px; --y: 15px; z-index: 3; }
.project-card:nth-child(4) { --r: 7deg; --x: -10px; --y: 5px; z-index: 2; }
.project-card:nth-child(5) { --r: -5deg; --x: 15px; --y: -15px; z-index: 4; }
.project-card:nth-child(6) { --r: 3deg; --x: -5px; --y: 20px; z-index: 1; }
.project-card:nth-child(7) { --r: -4deg; --x: 20px; --y: 0px; z-index: 5; }
.project-card:nth-child(8) { --r: 6deg; --x: -15px; --y: 10px; z-index: 3; }

.project-card:hover {
    z-index: 100 !important;
    transform: translate(0, -30px) scale(1.08) rotate(0deg);
    box-shadow: 0 25px 60px rgba(0,255,209,0.15);
    border-color: var(--cyan);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,255,209,0.02), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

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

.project-card-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.project-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    background: rgba(0, 255, 209, 0.06);
    color: var(--cyan);
    border: 1px solid rgba(0, 255, 209, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition);
}

.tag:hover {
    background: rgba(0, 255, 209, 0.12);
    border-color: rgba(0, 255, 209, 0.4);
    box-shadow: 0 0 10px var(--cyan-glow);
}

/* ─── Skills Section ─── */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.skill-badge {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all var(--transition);
    cursor: default;
}

.skill-badge:hover {
    color: var(--cyan);
    border-color: var(--border-cyan-strong);
    background: rgba(0, 255, 209, 0.05);
    box-shadow: 0 0 20px var(--cyan-glow);
    transform: translateY(-2px);
}

.skill-badge:nth-child(3n+1):hover { 
    color: var(--cyan);
    border-color: rgba(0, 255, 209, 0.5);
}

.skill-badge:nth-child(3n+2):hover {
    color: #A78BFA;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 20px var(--violet-glow);
}

/* ─── About Section ─── */
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 3rem;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--violet), transparent);
}

.about-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.about-card p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.about-education {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.about-education h4 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.about-education p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.about-cta {
    margin-top: 2rem;
}

/* ─── Contact Section ─── */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 20px var(--cyan-glow);
    background: rgba(0, 255, 209, 0.02);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    width: 100%;
}

/* ─── Flash Messages ─── */
.flash-message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
}

.flash-success {
    background: rgba(0, 255, 209, 0.08);
    border: 1px solid rgba(0, 255, 209, 0.3);
    color: var(--cyan);
}

.flash-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ─── CTA Banner ─── */
.cta-banner {
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    border-top: 1px solid var(--border-subtle);
}

.cta-banner h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.cta-banner p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* ─── Footer ─── */
footer {
    padding: 2rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

footer a {
    color: var(--cyan);
    text-decoration: none;
    transition: all var(--transition);
}

footer a:hover {
    text-shadow: 0 0 10px var(--cyan-glow);
}

/* ─── Scroll Animations ─── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Animations ─── */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scanline {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* ─── Cursor Blink ─── */
.cursor-blink::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--cyan);
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ─── Divider Line ─── */
.section-divider {
    width: 60px;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
    margin: 1rem 0;
}

/* ─── Stagger children animation ─── */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children.visible > *:nth-child(1) { animation: fadeSlideUp 0.5s ease forwards 0.05s; }
.stagger-children.visible > *:nth-child(2) { animation: fadeSlideUp 0.5s ease forwards 0.1s; }
.stagger-children.visible > *:nth-child(3) { animation: fadeSlideUp 0.5s ease forwards 0.15s; }
.stagger-children.visible > *:nth-child(4) { animation: fadeSlideUp 0.5s ease forwards 0.2s; }
.stagger-children.visible > *:nth-child(5) { animation: fadeSlideUp 0.5s ease forwards 0.25s; }
.stagger-children.visible > *:nth-child(6) { animation: fadeSlideUp 0.5s ease forwards 0.3s; }
.stagger-children.visible > *:nth-child(7) { animation: fadeSlideUp 0.5s ease forwards 0.35s; }
.stagger-children.visible > *:nth-child(8) { animation: fadeSlideUp 0.5s ease forwards 0.4s; }
.stagger-children.visible > *:nth-child(9) { animation: fadeSlideUp 0.5s ease forwards 0.45s; }
.stagger-children.visible > *:nth-child(10) { animation: fadeSlideUp 0.5s ease forwards 0.5s; }
.stagger-children.visible > *:nth-child(n+11) { animation: fadeSlideUp 0.5s ease forwards 0.55s; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section { padding: 5rem 0; }

    .hamburger {
        display: flex;
        z-index: 1002;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 320px;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-left: 1px solid var(--border-cyan);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        gap: 0.5rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
    }

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

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

    .hero-buttons {
        flex-direction: column;
    }

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

    .about-card {
        padding: 2rem 1.5rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .marquee-line {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 1.2rem;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .skills-grid {
        gap: 0.5rem;
    }

    .skill-badge {
        font-size: 0.7rem;
        padding: 0.5rem 0.9rem;
    }
}

/* ─── Mobile Nav Overlay ─── */
.nav-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ═══════════════════════════════════════════════════════
   BREATHING ANIMATIONS — Make the site feel alive
   ═══════════════════════════════════════════════════════ */

/* ─── Custom Cursor ─── */
.custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: difference;
    box-shadow: 0 0 10px var(--cyan-glow), 0 0 20px var(--cyan-glow);
}

.custom-cursor.cursor-hover {
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 209, 0.08);
    border: 1px solid rgba(0, 255, 209, 0.4);
    mix-blend-mode: normal;
}

.custom-cursor-trail {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 255, 209, 0.15);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.custom-cursor-trail.cursor-hover {
    width: 60px;
    height: 60px;
    border-color: rgba(0, 255, 209, 0.08);
}

/* Hide on mobile */
@media (hover: none) {
    .custom-cursor, .custom-cursor-trail { display: none !important; }
}

/* ─── Scroll Progress Bar ─── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    z-index: 10001;
    transition: width 0.05s linear;
    box-shadow: 0 0 10px var(--cyan-glow);
}

/* ─── Text Reveal (clip mask slide-up) ─── */
.text-reveal {
    overflow: hidden;
    display: inline-block;
}

.text-reveal-inner {
    display: inline-block;
    transform: translateY(105%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-reveal.revealed .text-reveal-inner {
    transform: translateY(0);
}

/* ─── Card Glow (follows cursor inside card) ─── */
.card-glow {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    z-index: 0;
}

/* ─── 3D Tilt Cards ─── */
.tilt-card {
    transition: transform 0.15s ease-out, border-color var(--transition), box-shadow var(--transition);
    will-change: transform;
    transform-style: preserve-3d;
}

/* ─── Magnetic buttons ─── */
.magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                color var(--transition), 
                border-color var(--transition),
                background var(--transition),
                box-shadow var(--transition);
    will-change: transform;
}

/* ─── Active Nav Link ─── */
.nav-links a.active {
    color: var(--cyan);
}

.nav-links a.active::after {
    width: 80%;
}

/* ─── Breathing Orbs (slow pulse) ─── */
.bg-orbs .orb-1 {
    animation: orbFloat 20s ease-in-out infinite, orbBreathe 6s ease-in-out infinite;
}

.bg-orbs .orb-2 {
    animation: orbFloat 25s ease-in-out infinite, orbBreathe 8s ease-in-out infinite 2s;
}

.bg-orbs .orb-3 {
    animation: orbFloat 18s ease-in-out infinite, orbBreathe 7s ease-in-out infinite 4s;
}

@keyframes orbBreathe {
    0%, 100% { opacity: 0.08; filter: blur(120px); }
    50% { opacity: 0.18; filter: blur(100px); }
}

/* ─── Dot-Grid Logo Pulse Animation ─── */
@keyframes gridPulse {
    0%, 100% {
        filter: drop-shadow(0 0 4px var(--cyan-glow));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 10px var(--cyan-glow-strong));
        transform: scale(1.05);
    }
}

.grid-logo-svg circle {
    transition: r 0.4s ease, opacity 0.4s ease;
}

.logo:hover .grid-logo-svg circle {
    opacity: 1 !important;
}

/* ─── Smoother section reveals ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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



/* ─── Skill badges stagger ─── */
.skill-badge {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    transition: opacity 0.5s ease,
                transform 0.5s ease,
                color var(--transition),
                border-color var(--transition),
                background var(--transition),
                box-shadow var(--transition);
}

.skill-badge.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ─── Expertise card breathe on idle ─── */
.expertise-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 40%; height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--cyan-glow), transparent);
    animation: lineBreath 4s ease-in-out infinite;
}

@keyframes lineBreath {
    0%, 100% { opacity: 0; width: 20%; }
    50% { opacity: 1; width: 60%; }
}

/* ─── Hero buttons subtle pulse ─── */
.hero-buttons .btn-outline {
    animation: btnPulse 3s ease-in-out infinite;
}

.hero-buttons .btn-outline:nth-child(2) {
    animation-delay: 1.5s;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 209, 0); }
    50% { box-shadow: 0 0 0 4px rgba(0, 255, 209, 0.06); }
}

/* ─── Hero label line animate ─── */
.hero-label::before {
    animation: lineExpand 1s ease-out forwards 0.1s;
    width: 0;
}

@keyframes lineExpand {
    to { width: 30px; }
}

/* ─── Input field animated border ─── */
.form-group input,
.form-group textarea {
    background-image: linear-gradient(var(--cyan), var(--cyan));
    background-size: 0% 2px;
    background-position: center bottom;
    background-repeat: no-repeat;
    transition: all var(--transition), background-size 0.4s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    background-size: 100% 2px;
}

/* ─── Architecture marquee smooth motion ─── */
.marquee-track {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* ═══════════════════════════════════════════════════════
   STAGGER OBSERVER — apply via JS
   ═══════════════════════════════════════════════════════ */

/* Override any old stagger-children rules */
.stagger-children > * {
    /* Let JS handle these individually */
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE & TABLET
   ═══════════════════════════════════════════════════════ */

/* ─── Nav Overlay ─── */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ─── Tablet (max-width: 900px) ─── */
@media (max-width: 900px) {
    .hero-split {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-terminal {
        max-width: 100%;
    }

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

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

/* ─── Mobile (max-width: 768px) ─── */
@media (max-width: 768px) {
    /* Show hamburger */
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    /* Hamburger X animation when active */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Sidebar panel */
    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 260px;
        height: 100vh;
        background: rgba(8, 8, 8, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-cyan);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.5rem;
        padding: 2rem 1.5rem;
        z-index: 999;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        width: 100%;
        border-bottom: 1px solid var(--border-subtle);
        letter-spacing: 0.15em;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a::after {
        bottom: -1px;
        left: 0;
        transform: none;
    }

    .nav-links a:hover::after {
        width: 100%;
    }

    /* Hero adjustments */
    .hero {
        padding-top: 100px;
        min-height: auto;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 3rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .hero-terminal {
        display: none;
    }

    /* Section adjustments */
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    /* Grid adjustments */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        gap: 0.5rem;
    }

    /* Footer */
    footer {
        padding: 2rem 0;
    }

    /* Container padding */
    .container {
        padding: 0 1rem;
    }

    /* CTA banner */
    .cta-banner h2 {
        font-size: 1.5rem;
    }

    /* Hide custom cursor on mobile */
    .custom-cursor,
    .custom-cursor-trail {
        display: none !important;
    }
}

/* ─── Small Mobile (max-width: 480px) ─── */
@media (max-width: 480px) {
    .navbar {
        padding: 0.8rem 1rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .logo-icon svg {
        width: 24px;
        height: 24px;
    }

    .logo-text {
        font-size: 0.85rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-label {
        font-size: 0.7rem;
    }

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

    .skill-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}