/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  --bg-primary: #0b0e14;
  --bg-secondary: #131a24;
  --surface: rgba(20, 30, 40, 0.72);
  --surface-solid: #16222e;
  --surface-elevated: #1a2a38;
  --text-primary: #f0f4fa;
  --text-secondary: #c8d6e5;
  --text-muted: #8fa3b8;
  --accent: #00e5ff;
  --accent-2: #b92bff;
  --accent-3: #00d9a5;
  --border: rgba(0, 229, 255, 0.18);
  --border-strong: rgba(0, 229, 255, 0.45);
  --glow: 0 0 24px rgba(0, 229, 255, 0.35);
  --nav-bg: rgba(8, 16, 24, 0.82);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.65);
  --shadow-md: 0 10px 30px -8px rgba(0, 0, 0, 0.5);
  --gradient-brand: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --gradient-soft: linear-gradient(145deg, #0e1a26 0%, #132433 100%);
  --radius-xl: 28px; --radius-lg: 20px; --radius-md: 14px; --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --container: 1240px;
  --header-h: 72px;
}
[data-theme="light"] {
  --bg-primary: #f5f9ff; --bg-secondary: #e9f0fa;
  --surface: rgba(255,255,255,0.78); --surface-solid: #ffffff; --surface-elevated: #f7faff;
  --text-primary: #0b1c2c; --text-secondary: #2c4258; --text-muted: #5a6f85;
  --accent: #0077be; --accent-2: #7b2eda; --accent-3: #008b6b;
  --border: rgba(0,119,190,0.22); --border-strong: rgba(0,119,190,0.5);
  --glow: 0 0 20px rgba(0,119,190,0.25);
  --nav-bg: rgba(255,255,255,0.82);
  --shadow-lg: 0 24px 48px -12px rgba(0,30,60,0.18);
  --shadow-md: 0 10px 24px -8px rgba(0,30,60,0.12);
  --gradient-soft: linear-gradient(145deg, #d4e6ff 0%, #eef4ff 100%);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary);
  line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased;
  overflow-x: hidden; transition: background .35s ease, color .35s ease;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
h1,h2,h3,h4 { line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 10000;
  background: var(--accent); color: #001018; padding: .75rem 1.25rem;
  border-radius: var(--radius-sm); font-weight: 600; transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  #bgCanvas { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
section { padding: clamp(4rem, 8vw, 6rem) 0; position: relative; }

.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
  color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem;
}
.section-eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.section-title { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 700; margin-bottom: 1rem; }
.section-sub { color: var(--text-secondary); font-size: clamp(1rem, 1.6vw, 1.1rem); }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 60px; font-weight: 600; font-size: .95rem;
  border: 1.5px solid transparent; cursor: pointer; line-height: 1; white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--gradient-brand); color: #04141c; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 32px var(--accent); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,229,255,.06); }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }

/* =========================================================
   HEADER
   ========================================================= */
header.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 900; height: var(--header-h);
  background: var(--nav-bg); backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: var(--container); margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}
.logo { font-weight: 800; font-size: 1.15rem; display: inline-flex; align-items: center; gap: .5rem; }
.logo-mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; background: var(--gradient-brand); color: #04141c;
  font-weight: 800; font-size: .95rem; box-shadow: var(--glow);
}
.logo-text { background: linear-gradient(135deg, var(--accent), var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-desktop { display: flex; align-items: center; gap: .25rem; }
.nav-desktop a.nav-link { padding: .5rem .9rem; font-size: .92rem; font-weight: 500; color: var(--text-secondary); border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition); }
.nav-desktop a.nav-link:hover, .nav-desktop a.nav-link[aria-current="page"] { color: var(--text-primary); background: var(--surface); }

.nav-actions { display: flex; align-items: center; gap: .75rem; margin-left: .75rem; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); color: var(--text-primary); background: transparent; transition: var(--transition); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,229,255,.06); }
.icon-btn svg { width: 18px; height: 18px; }

.hamburger { display: none; width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; background: var(--bg-primary); z-index: 950;
  display: flex; flex-direction: column; padding: calc(var(--header-h) + 2rem) 2rem 2rem;
  gap: .5rem; transform: translateX(100%); visibility: hidden;
  transition: transform .4s cubic-bezier(.77,.2,.05,1), visibility 0s linear .4s;
}
.mobile-menu.is-open { transform: translateX(0); visibility: visible; transition: transform .4s cubic-bezier(.77,.2,.05,1), visibility 0s linear 0s; }
.mobile-menu a { font-size: 1.5rem; font-weight: 600; padding: .9rem 0; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu .menu-actions { margin-top: 1rem; display: flex; flex-direction: column; gap: .75rem; }

/* =========================================================
   HERO
   ========================================================= */
#hero {
  padding-top: calc(var(--header-h) + clamp(2rem, 6vw, 4rem));
  padding-bottom: clamp(3rem, 8vw, 6rem);
  min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; position: relative; background: var(--gradient-soft);
}
#bgCanvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .85; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; width: 100%; }
.hero-text > * + * { margin-top: 1rem; }

.badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 60px; font-size: .8rem; font-weight: 500; color: var(--text-secondary); backdrop-filter: blur(10px); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,217,165,.55); } 70% { box-shadow: 0 0 0 10px rgba(0,217,165,0); } 100% { box-shadow: 0 0 0 0 rgba(0,217,165,0); } }

h1.hero-title { display: flex; flex-direction: column; gap: .4rem; margin-top: 1.25rem; }
.hero-name { font-size: clamp(2.1rem, 5.5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; }
.hero-role { font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 600; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 50%, var(--accent-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tagline { font-size: clamp(1.1rem, 1.8vw, 1.3rem); font-weight: 500; max-width: 60ch; margin-top: 1.25rem !important; }
.hero-desc { color: var(--text-secondary); max-width: 60ch; font-size: 1rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem !important; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem !important; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: clamp(1.4rem, 2.5vw, 1.8rem); font-weight: 700; color: var(--accent); line-height: 1; }
.hero-stats span { font-size: .82rem; color: var(--text-muted); margin-top: .4rem; text-transform: uppercase; letter-spacing: .04em; }

.hero-visual { position: relative; }
.code-card { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); transform: perspective(1200px) rotateY(-4deg) rotateX(2deg); transition: transform .5s ease; }
.code-card:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.code-header { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; background: var(--surface-elevated); border-bottom: 1px solid var(--border); }
.code-header .dots { display: flex; gap: 6px; }
.code-header .dots span { width: 11px; height: 11px; border-radius: 50%; }
.code-header .dots span:nth-child(1) { background: #ff5f57; }
.code-header .dots span:nth-child(2) { background: #febc2e; }
.code-header .dots span:nth-child(3) { background: #28c840; }
.code-header .filename { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); margin-left: .5rem; }
.code-card pre { padding: 1.25rem; font-family: var(--font-mono); font-size: .82rem; line-height: 1.7; overflow-x: auto; }
.tok-kw { color: #ff79c6; } .tok-fn { color: #50fa7b; } .tok-str { color: #f1fa8c; }
.tok-num { color: #bd93f9; } .tok-com { color: #6272a4; font-style: italic; }
[data-theme="light"] .tok-kw { color: #af00db; } [data-theme="light"] .tok-fn { color: #0a7d3a; }
[data-theme="light"] .tok-str { color: #a31515; } [data-theme="light"] .tok-num { color: #6f42c1; } [data-theme="light"] .tok-com { color: #6a737d; }

/* =========================================================
   PAGE HERO (subpages)
   ========================================================= */
.page-hero {
  padding: calc(var(--header-h) + clamp(2rem, 5vw, 3rem)) 0 clamp(2rem, 4vw, 3rem);
  background: var(--gradient-soft); border-bottom: 1px solid var(--border);
}
.breadcrumbs { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--text-secondary); transition: color var(--transition); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-current] { color: var(--text-primary); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .75rem; }
.page-hero p.lead { color: var(--text-secondary); font-size: clamp(1rem, 1.8vw, 1.15rem); max-width: 720px; }

/* =========================================================
   PROJECTS / SERVICES / SKILLS / PROCESS
   ========================================================= */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.project-card { display: flex; flex-direction: column; background: var(--surface); backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.75rem; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.project-card-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.project-icon { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--radius-md); background: linear-gradient(135deg, rgba(0,229,255,.15), rgba(185,43,255,.15)); border: 1px solid var(--border); color: var(--accent); }
.project-icon svg { width: 24px; height: 24px; }
.project-title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.project-role { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; font-family: var(--font-mono); }
.case-block { font-size: .9rem; color: var(--text-secondary); padding: .55rem 0; border-top: 1px dashed var(--border); }
.case-block:first-of-type { border-top: none; padding-top: 0; margin-top: .75rem; }
.case-block strong { color: var(--accent); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: .2rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.tag { font-family: var(--font-mono); font-size: .72rem; padding: .28rem .7rem; background: rgba(0,229,255,.08); border: 1px solid var(--border); border-radius: 60px; color: var(--text-secondary); }
.project-links { display: flex; gap: 1rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.project-links a { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 500; color: var(--accent); transition: color var(--transition); }
.project-links a:hover { color: var(--accent-3); }
.project-links svg { width: 15px; height: 15px; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.service-card { background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem 1.5rem; transition: var(--transition); }
.service-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.service-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-md); background: rgba(0,229,255,.1); border: 1px solid var(--border); color: var(--accent); margin-bottom: 1rem; }
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.service-card p { font-size: .9rem; color: var(--text-secondary); margin-bottom: 1rem; }
.service-card ul { font-size: .85rem; color: var(--text-muted); display: flex; flex-direction: column; gap: .4rem; }
.service-card li { display: flex; align-items: flex-start; gap: .5rem; }
.service-card li::before { content: '✓'; color: var(--accent-3); font-weight: 700; flex-shrink: 0; }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.skill-group { background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.skill-group h3 { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.skill-group h3 svg { width: 16px; height: 16px; }
.skill-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.skill-pill { font-family: var(--font-mono); font-size: .78rem; padding: .4rem .8rem; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: var(--transition); }
.skill-pill:hover { border-color: var(--accent); color: var(--accent); }

.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.process-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.process-step .step-num { font-family: var(--font-mono); font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.process-step .step-num::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.process-step h3 { font-size: 1rem; margin-bottom: .4rem; }
.process-step p { font-size: .88rem; color: var(--text-secondary); }

/* =========================================================
   ABOUT / CERTS
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.about-card, .certs-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; }
.about-card p { color: var(--text-secondary); margin-bottom: 1rem; }
.about-meta { display: flex; flex-direction: column; gap: .6rem; margin: 1.5rem 0; font-size: .9rem; color: var(--text-secondary); }
.about-meta li { display: flex; align-items: center; gap: .6rem; }
.about-meta svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.certs-card h3 { font-size: 1rem; color: var(--accent); margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.certs-card h3 svg { width: 18px; height: 18px; }
.cert-group { margin-bottom: 1.25rem; }
.cert-group:last-child { margin-bottom: 0; }
.cert-group h4 { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .5rem; }
.cert-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.cert-item { font-size: .78rem; padding: .3rem .7rem; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); }

/* =========================================================
   CONTACT / FORM
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2rem; align-items: start; }
.contact-info-card, .contact-form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; }
.contact-info-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.contact-info-card > p { color: var(--text-secondary); font-size: .92rem; margin-bottom: 1.5rem; }
.contact-info-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.contact-info-list a, .contact-info-list span { display: flex; align-items: center; gap: .75rem; font-size: .92rem; transition: color var(--transition); }
.contact-info-list a:hover { color: var(--accent); }
.contact-info-list svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.social-links { display: flex; gap: .75rem; }
.social-links a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); transition: var(--transition); }
.social-links a:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,229,255,.08); transform: translateY(-2px); }
.social-links svg { width: 18px; height: 18px; }

.form-row { display: grid; gap: 1rem; margin-bottom: 1rem; }
.form-row.two-col { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .82rem; font-weight: 500; color: var(--text-secondary); }
.field label .req { color: var(--accent-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .9rem; background: var(--bg-secondary);
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-primary); font-family: var(--font-sans); font-size: .92rem;
  transition: var(--transition);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(0,229,255,.15);
}
.field textarea { resize: vertical; min-height: 90px; }
.field select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238fa3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px; padding-right: 2.5rem; }

.form-feedback { margin-top: .75rem; font-size: .88rem; padding: .75rem 1rem; border-radius: var(--radius-md); display: none; }
.form-feedback.success { display: block; background: rgba(0,217,165,.1); color: var(--accent-3); border: 1px solid rgba(0,217,165,.35); }
.form-feedback.error { display: block; background: rgba(255,90,90,.1); color: #ff8a8a; border: 1px solid rgba(255,90,90,.35); }
.form-feedback.loading { display: block; background: var(--surface-elevated); color: var(--text-secondary); border: 1px solid var(--border); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* =========================================================
   BLOG
   ========================================================= */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.blog-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); }
.blog-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.blog-card-cover { aspect-ratio: 16/9; background: var(--gradient-soft); display: grid; place-items: center; color: var(--accent); font-size: 3rem; }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.blog-meta { font-family: var(--font-mono); font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; display: flex; gap: .75rem; }
.blog-card h3 { font-size: 1.1rem; margin-bottom: .5rem; line-height: 1.35; }
.blog-card p { font-size: .9rem; color: var(--text-secondary); margin-bottom: 1rem; flex: 1; }
.blog-card .read-more { font-size: .85rem; font-weight: 500; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }

.article-header { max-width: 780px; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.article-header h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); margin-bottom: 1rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-family: var(--font-mono); font-size: .82rem; color: var(--text-muted); }

.article-content { max-width: 780px; margin: 0 auto; font-size: 1.05rem; color: var(--text-secondary); }
.article-content > * + * { margin-top: 1.5rem; }
.article-content h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); color: var(--text-primary); margin-top: 2.5rem; }
.article-content h3 { font-size: clamp(1.15rem, 2.4vw, 1.35rem); color: var(--text-primary); margin-top: 2rem; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content ul, .article-content ol { padding-left: 1.5rem; }
.article-content ul li { list-style: disc; margin-top: .5rem; }
.article-content ol li { list-style: decimal; margin-top: .5rem; }
.article-content blockquote { border-left: 3px solid var(--accent); padding: .75rem 1.25rem; background: var(--surface); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-style: italic; }
.article-content pre { background: var(--surface-solid); border: 1px solid var(--border); padding: 1.25rem; border-radius: var(--radius-md); overflow-x: auto; font-family: var(--font-mono); font-size: .85rem; line-height: 1.6; }
.article-content code:not(pre code) { background: var(--surface-elevated); padding: .15rem .4rem; border-radius: 4px; font-family: var(--font-mono); font-size: .88em; color: var(--accent); }

/* =========================================================
   RESUME
   ========================================================= */
.resume-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.resume-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.5rem; }
.resume-section h2 { font-size: 1.1rem; margin-bottom: 1.25rem; display: flex; align-items: center; gap: .6rem; color: var(--accent); }
.resume-section h2 svg { width: 20px; height: 20px; }
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: .5rem; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -1.5rem; top: .4rem; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg-primary); }
.timeline-item h3 { font-size: 1rem; margin-bottom: .2rem; }
.timeline-item .timeline-meta { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); margin-bottom: .4rem; }
.timeline-item p { font-size: .9rem; color: var(--text-secondary); }

/* =========================================================
   404
   ========================================================= */
.not-found { min-height: calc(100vh - var(--header-h)); display: flex; align-items: center; padding: calc(var(--header-h) + 2rem) 0 3rem; text-align: center; background: var(--gradient-soft); }
.not-found-inner { max-width: 640px; margin: 0 auto; }
.not-found-code { font-family: var(--font-mono); font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; line-height: 1; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 1rem; }
.not-found h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 1rem; }
.not-found p { color: var(--text-secondary); margin-bottom: 2rem; }
.not-found-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }

/* =========================================================
   LEGAL / PRIVACY
   ========================================================= */
.legal-content { max-width: 780px; margin: 0 auto; color: var(--text-secondary); }
.legal-content > * + * { margin-top: 1.25rem; }
.legal-content h2 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); color: var(--text-primary); margin-top: 2rem; }
.legal-content h3 { font-size: 1.1rem; color: var(--text-primary); margin-top: 1.5rem; }
.legal-content ul { padding-left: 1.5rem; list-style: disc; }
.legal-content li { margin-top: .5rem; }
.legal-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   CTA BANNER
   ========================================================= */
.cta-banner { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-xl); padding: clamp(2rem, 5vw, 3rem); text-align: center; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; inset: -50%; background: radial-gradient(circle, rgba(0,229,255,.15), transparent 60%); pointer-events: none; }
.cta-banner > * { position: relative; }
.cta-banner h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: .75rem; }
.cta-banner p { color: var(--text-secondary); max-width: 560px; margin: 0 auto 1.75rem; }
.cta-banner .btn-group { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
footer.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; background: var(--bg-secondary); margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand p { color: var(--text-secondary); font-size: .9rem; margin-top: .75rem; max-width: 320px; }
.footer-brand .availability { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--accent-3); margin-top: 1rem; font-weight: 500; }
.footer-brand .availability::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-3); }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { font-size: .9rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: var(--text-muted); }

/* =========================================================
   REVEAL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   COOKIE CONSENT
   ========================================================= */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 9999;
  max-width: 480px; margin: 0 auto;
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-lg);
  transform: translateY(calc(100% + 2rem)); transition: transform .4s ease;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner h3 { font-size: 1rem; margin-bottom: .4rem; }
.cookie-banner p { font-size: .85rem; color: var(--text-secondary); margin-bottom: 1rem; }
.cookie-banner a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: .5rem; }
.cookie-actions .btn { flex: 1; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { order: 2; }
  .code-card { transform: none; }
  .about-grid, .contact-grid, .resume-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .hero-stats { gap: .5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}