/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--coffee); color: var(--white);
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

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

:root {
  /* ── Colour palette ───────────────────────────────── */
  --bg: #F8F9FA;
  --white: #ffffff;
  --cream: #F4F5F7;
  --coffee: #2563EB;
  --coffee-light: #3B82F6;
  --coffee-dark: #1E40AF;
  --espresso: #0A1128;
  --text: #0A1128;
  --muted: #4A5568;
  --border: #E3E6EB;
  --shadow: rgba(10,17,40,0.06);
  --shadow-md: rgba(10,17,40,0.12);
  --shadow-lg: rgba(10,17,40,0.20);

  /* ── Radius tokens ────────────────────────────────── */
  --radius-xs: 2px;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* ── Typography ───────────────────────────────────── */
  --sans:  'Inter', sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
  --mono:  'JetBrains Mono', monospace;

  /* ── Motion tokens ────────────────────────────────── */
  --motion-ease-premium:  cubic-bezier(0.16, 1, 0.3, 1);
  --motion-ease-out:      cubic-bezier(0.0,  0, 0.2, 1);
  --motion-ease-in-out:   cubic-bezier(0.4,  0, 0.2, 1);
  --motion-ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-duration-fast:   0.15s;
  --motion-duration-base:   0.35s;
  --motion-duration-slow:   0.65s;
  --motion-duration-crawl:  1.1s;
  --motion-stagger-step:    60ms;

  /* ── Scale tokens ─────────────────────────────────── */
  --scale-hover:  1.02;
  --scale-active: 0.98;

  /* ── Focus token ──────────────────────────────────── */
  --focus-ring: 0 0 0 3px rgba(37,99,235,0.45);

  /* ── Legacy alias (keeps old code working) ────────── */
  --transition: var(--motion-duration-base) var(--motion-ease-out);

  /* ── Grid background tokens ───────────────────────── */
  --grid-size:   56px;
  --grid-line:   rgba(37,99,235,0.10);
  --glow-radius: 360px;
  --glow-line:   rgba(37,99,235,0.65);

  /* ── Navbar surface token ─────────────────────────── */
  --navbar-bg:   rgba(248,249,250,0.93);
  --navbar-border: var(--border);
}

/* ── DARK THEME OVERRIDES ────────────────────────────────────
   All primitives swap here. No hardcoded values anywhere else. */
[data-theme="dark"] {
  --bg:            #0A1128;
  --white:         #111A33;
  --cream:         #0D1321;
  --coffee:        #3B82F6;
  --coffee-light:  #60A5FA;
  --coffee-dark:   #2563EB;
  --espresso:      #F8F9FA;
  --text:          #E2E8F0;
  --muted:         #94A3B8;
  --border:        #1E293B;
  --shadow:        rgba(0,0,0,0.35);
  --shadow-md:     rgba(0,0,0,0.55);
  --shadow-lg:     rgba(0,0,0,0.75);
  --focus-ring:    0 0 0 3px rgba(59,130,246,0.55);
  --navbar-bg:     rgba(10,17,40,0.92);
  --navbar-border: rgba(255,255,255,0.06);
  --grid-line:     rgba(59,130,246,0.14);
  --glow-line:     rgba(59,130,246,0.70);
}

/* ── Smooth palette transitions ──────────────────────────── */
body,
.navbar,
.service-card,
.project-card,
.cert-card,
.channel-card,
.about-card,
.contact-form,
.footer {
  transition:
    background-color var(--motion-duration-slow) var(--motion-ease-out),
    border-color     var(--motion-duration-slow) var(--motion-ease-out),
    color            var(--motion-duration-slow) var(--motion-ease-out);
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.7; font-size: 16px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
.serif { font-family: var(--serif); }
h1,h2,h3 { line-height: 1.2; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--navbar-border);
  transition: box-shadow var(--transition), background var(--motion-duration-slow) var(--motion-ease-out), border-color var(--motion-duration-slow) var(--motion-ease-out);
}
.navbar.scrolled { box-shadow: 0 2px 24px var(--shadow-md); }
.nav-container {
  max-width: 1120px; margin: 0 auto; padding: 0 28px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.logo-img { height: 38px; width: auto; object-fit: contain; border-radius: 6px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--muted);
  transition: color var(--transition); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--coffee); transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--coffee-dark); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  background: var(--coffee) !important; color: var(--white) !important;
  padding: 8px 20px; border-radius: 100px; font-weight: 600 !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--coffee-dark) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--espresso); border-radius: 2px; transition: var(--transition); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 100px 28px 60px; max-width: 1120px; margin: 0 auto;
}
.hero-inner { display: flex; gap: 64px; align-items: center; width: 100%; }
.hero-left { flex: 1; }
.hero-right { flex: 0 0 400px; display: flex; flex-direction: column; gap: 20px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 600; color: var(--coffee);
  letter-spacing: 0.3px; margin-bottom: 20px;
}
.dot-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,0.4)} 70%{box-shadow:0 0 0 8px rgba(34,197,94,0)} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0)} }
.hero-title {
  font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 700; color: var(--espresso); letter-spacing: -1px; margin-bottom: 20px;
}
.hero-title .accent { color: var(--coffee); }
.hero-sub { font-size: 1rem; color: var(--muted); max-width: 500px; margin-bottom: 32px; line-height: 1.8; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-socials { display: flex; gap: 14px; }
.hero-socials a {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 1rem; transition: all var(--transition);
}
.hero-socials a:hover { border-color: var(--coffee); color: var(--coffee); background: var(--cream); }

/* ===== TERMINAL ===== */
.terminal { background: var(--espresso); border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 64px rgba(44,26,14,0.22); font-family: var(--mono); }
.terminal-bar { background: #1a0f08; padding: 12px 16px; display: flex; align-items: center; gap: 8px; }
.tdot { width: 12px; height: 12px; border-radius: 50%; }
.tdot.red { background: #ff5f57; } .tdot.yellow { background: #febc2e; } .tdot.green { background: #28c840; }
.terminal-title { margin-left: auto; font-size: 0.72rem; color: rgba(255,255,255,0.35); }
.terminal-body { padding: 20px 24px; font-size: 0.8rem; line-height: 2.1; }
.terminal-body p { color: rgba(255,255,255,0.8); }
.prompt { color: var(--coffee-light); margin-right: 8px; }
.out { color: #a8d8a8; padding-left: 16px; }
.cursor { display: inline-block; animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.hero-stats { display: flex; gap: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hstat { flex: 1; text-align: center; padding: 18px 12px; border-right: 1px solid var(--border); }
.hstat:last-child { border-right: none; }
.hstat-n { display: block; font-size: 1.6rem; font-weight: 700; color: var(--coffee); font-family: var(--serif); }
.hstat-l { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); border: 2px solid transparent;
}
.btn-primary { background: var(--coffee); color: var(--white); border-color: var(--coffee); }
.btn-primary:hover { background: var(--coffee-dark); border-color: var(--coffee-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.28); }
.btn-outline { background: transparent; color: var(--coffee-dark); border-color: var(--coffee-light); }
.btn-outline:hover { background: var(--cream); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }

/* ===== SECTIONS ===== */
.section { padding: 96px 28px; }
.section-alt { background: var(--cream); }
.container { max-width: 1120px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--coffee); margin-bottom: 12px; }
.section-header h2 { font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 700; color: var(--espresso); letter-spacing: -0.5px; }
.section-desc { font-size: 1rem; color: var(--muted); max-width: 560px; margin: 14px auto 0; line-height: 1.8; }
.section-cta { text-align: center; margin-top: 48px; }

/* ===== SERVICES ===== */
.services-section { background: var(--white); }
.services-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.service-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 22px; transition: all var(--transition);
}
.service-card:hover { border-color: var(--coffee-light); box-shadow: 0 8px 32px var(--shadow-md); transform: translateY(-4px); }
.service-icon { width: 46px; height: 46px; background: var(--cream); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--coffee); margin-bottom: 16px; }
.service-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--espresso); margin-bottom: 8px; }
.service-card p { font-size: 0.86rem; color: var(--muted); }

/* ===== PROJECTS GRID ===== */
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.project-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: all var(--transition); display: flex; flex-direction: column;
}
.project-card:hover { border-color: var(--coffee-light); box-shadow: 0 10px 40px var(--shadow-md); transform: translateY(-4px); }
.project-card.featured { border-color: var(--coffee-light); background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%); }
.project-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.project-icon { width: 44px; height: 44px; background: var(--cream); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--coffee); }
.project-status { font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 100px; background: #f0f0f0; color: var(--muted); }
.project-status.active { background: #dcfce7; color: #16a34a; }
.project-card h3 { font-size: 1rem; font-weight: 700; color: var(--espresso); margin-bottom: 10px; }
.project-card p { font-size: 0.87rem; color: var(--muted); flex: 1; margin-bottom: 16px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.project-tags span { font-size: 0.72rem; font-weight: 600; background: var(--cream); color: var(--coffee-dark); padding: 3px 10px; border-radius: 100px; border: 1px solid var(--border); }
.project-link { font-size: 0.85rem; font-weight: 600; color: var(--coffee); display: flex; align-items: center; gap: 6px; margin-top: auto; transition: gap var(--transition); }
.project-link:hover { gap: 10px; }

/* ===== SKILLS ===== */
.skills-wrapper { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
.skill-group { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.skill-group h4 { font-size: 0.9rem; font-weight: 700; color: var(--espresso); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.skill-group h4 i { color: var(--coffee); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span { font-size: 0.8rem; font-weight: 500; background: var(--cream); color: var(--coffee-dark); padding: 5px 14px; border-radius: 100px; border: 1px solid var(--border); transition: all var(--transition); }
.skill-tags span:hover { background: var(--coffee); color: var(--white); border-color: var(--coffee); }

/* ===== CERTIFICATIONS ===== */
.certs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.cert-card { display: flex; align-items: flex-start; gap: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: all var(--transition); }
.cert-card:hover { border-color: var(--coffee-light); box-shadow: 0 8px 32px var(--shadow-md); }
.cert-card.learning { opacity: 0.8; }
.cert-logo { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.cert-logo.google { background: #fef3e2; color: #f59e0b; }
.cert-logo.cisco { background: #e8f4fd; color: #1d6fa4; }
.cert-logo.nde { background: #fde8e8; color: #c0392b; }
.cert-logo.arena { background: #e8fdf0; color: #27ae60; }
.cert-logo.ms { background: #e8f0fe; color: #1a73e8; }
.cert-info { flex: 1; }
.cert-info h3 { font-size: 0.9rem; font-weight: 700; color: var(--espresso); margin-bottom: 4px; }
.cert-info p { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.cert-footer { display: flex; }
.cert-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; }
.cert-badge.verified { background: #dcfce7; color: #16a34a; }
.cert-badge.learning { background: #fef9c3; color: #ca8a04; }
.cert-badge.planned { background: #f0f0f0; color: var(--muted); }

/* ===== ABOUT SPLIT ===== */
.about-split { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }
.about-left .section-tag { display: inline-block; margin-bottom: 12px; }
.about-left h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--espresso); margin-bottom: 20px; }
.about-left p { color: var(--muted); margin-bottom: 14px; font-size: 0.97rem; }
.about-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: 0 4px 20px var(--shadow); margin-bottom: 16px; }
.about-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--espresso); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.info-list li { display: flex; align-items: center; gap: 12px; font-size: 0.87rem; color: var(--muted); padding: 9px 0; border-bottom: 1px solid var(--border); }
.info-list li:last-child { border-bottom: none; }
.info-list i { color: var(--coffee); width: 16px; text-align: center; flex-shrink: 0; }
.about-stats-row { display: flex; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.astat { flex: 1; text-align: center; padding: 18px 10px; border-right: 1px solid var(--border); }
.astat:last-child { border-right: none; }
.astat-n { display: block; font-size: 1.6rem; font-weight: 700; color: var(--coffee); font-family: var(--serif); }
.astat-l { font-size: 0.72rem; color: var(--muted); }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-channels { display: flex; flex-direction: column; gap: 12px; }
.channel-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; transition: all var(--transition); cursor: pointer;
}
.channel-card:hover { border-color: var(--coffee-light); box-shadow: 0 4px 20px var(--shadow-md); transform: translateX(4px); }
.channel-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.channel-icon.email { background: #fde8e8; color: #c0392b; }
.channel-icon.linkedin { background: #e8f4fd; color: #0077b5; }
.channel-icon.github { background: #f0f0f0; color: #1c1c1c; }
.channel-icon.medium { background: #f0f0f0; color: #1c1c1c; }
.channel-icon.phone { background: #e8fdf0; color: #27ae60; }
.channel-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.channel-val { font-size: 0.88rem; color: var(--text); font-weight: 500; }
.channel-arrow { margin-left: auto; color: var(--muted); font-size: 0.8rem; transition: transform var(--transition); }
.channel-card:hover .channel-arrow { transform: translateX(4px); color: var(--coffee); }

/* ===== CONTACT FORM ===== */
.contact-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; box-shadow: 0 4px 24px var(--shadow); }
.form-title { font-family: var(--serif); font-size: 1.4rem; color: var(--espresso); margin-bottom: 6px; }
.form-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--espresso); margin-bottom: 7px; }
.req { color: var(--coffee); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 0.9rem; color: var(--text);
  background: var(--bg); transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; resize: vertical; appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--coffee); background: var(--white);
  box-shadow: 0 0 0 3px rgba(139,94,60,0.1);
}
.form-group select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B6B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.form-note { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.form-note i { color: var(--coffee); }

/* ===== PAGE HERO ===== */
.page-hero {
  background: var(--espresso); color: var(--white);
  padding: 120px 28px 72px; text-align: center;
}
.page-hero .section-tag { color: var(--coffee-light); }
.page-hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); color: var(--white); margin: 12px 0 16px; }
.page-hero p { font-size: 1rem; color: rgba(255,255,255,0.65); max-width: 560px; margin: 0 auto 28px; }

/* ===== PORTFOLIO PAGE ===== */
.portfolio-layout { display: flex; flex-direction: column; gap: 48px; }
.port-block {}
.port-title { font-size: 1.5rem; color: var(--espresso); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.port-title i { color: var(--coffee); font-size: 1.1rem; }
.port-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.port-card p { color: var(--muted); font-size: 0.95rem; }
.skills-matrix { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.matrix-row { display: grid; grid-template-columns: 200px 1fr 160px; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--border); align-items: center; font-size: 0.88rem; }
.matrix-row:last-child { border-bottom: none; }
.matrix-row.header { background: var(--cream); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.level-bar { background: var(--border); border-radius: 100px; height: 6px; overflow: hidden; }
.level-fill { height: 100%; background: linear-gradient(90deg, var(--coffee-light), var(--coffee)); border-radius: 100px; }
.port-certs { display: flex; flex-direction: column; gap: 12px; }
.port-cert { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; }
.port-cert.learning { opacity: 0.7; }
.port-cert i { font-size: 1.3rem; color: var(--coffee); width: 28px; text-align: center; flex-shrink: 0; }
.port-cert strong { font-size: 0.92rem; color: var(--espresso); }
.port-cert p { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.port-timeline { position: relative; padding-left: 28px; }
.port-timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--coffee-light); border-radius: 2px; }
.pt-item { position: relative; margin-bottom: 28px; }
.pt-item:last-child { margin-bottom: 0; }
.pt-dot { position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--coffee); border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--coffee-light); flex-shrink: 0; }
.pt-body { display: flex; flex-direction: column; gap: 4px; }
.pt-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.pt-head h3 { font-size: 1rem; font-weight: 700; color: var(--espresso); line-height: 1.3; }
.pt-head span { font-size: 0.78rem; color: var(--muted); white-space: nowrap; padding-top: 2px; font-family: var(--mono); }
.pt-org { font-size: 0.82rem; color: var(--coffee-dark); font-weight: 600; }
.pt-body > p:not(.pt-org) { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.port-edu { display: flex; flex-direction: column; gap: 12px; }
.edu-row { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; }
.edu-icon-sm { width: 40px; height: 40px; background: var(--cream); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--coffee); flex-shrink: 0; }
.edu-row strong { font-size: 0.92rem; color: var(--espresso); }
.edu-row p { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

/* ===== PROFESSIONAL SUMMARY ===== */
.summary-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden; }
.summary-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--coffee), var(--coffee-light)); }
.summary-lead { font-size: 1.12rem !important; font-weight: 600; color: var(--espresso) !important; line-height: 1.5; margin-bottom: 14px; }
.summary-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.summary-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.fact { display: flex; align-items: center; gap: 12px; }
.fact-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--cream); color: var(--coffee); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.fact-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fact-text span { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }
.fact-text strong { font-size: 0.88rem; color: var(--espresso); }
@media (max-width: 560px) { .summary-facts { grid-template-columns: 1fr; } }

/* ===== SKILLS MATRIX TABLE ===== */
.matrix-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.matrix-header .port-title { margin-bottom: 0; }
.matrix-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.matrix-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; color: var(--muted); }
.matrix-legend i { font-size: 0.55rem; }
.matrix-legend i.adv { color: var(--coffee-dark); }
.matrix-legend i.int { color: var(--coffee); }
.matrix-legend i.fnd { color: var(--coffee-light); }
.matrix-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.matrix-table thead tr { background: var(--cream); }
.matrix-table th { padding: 12px 16px; text-align: left; font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.matrix-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--muted); }
.matrix-table tbody tr:last-child td { border-bottom: none; }
.matrix-table tbody tr:hover { background: rgba(139,94,60,0.04); }
.matrix-table td:first-child { font-weight: 600; color: var(--espresso); white-space: nowrap; }
.matrix-table td:nth-child(2) { font-size: 0.85rem; }
.skill-name { display: inline-flex; align-items: center; gap: 10px; }
.skill-name i { color: var(--coffee); font-size: 0.95rem; width: 18px; text-align: center; }
.level-wrap { display: flex; align-items: center; gap: 12px; }
.level-bar { background: var(--border); border-radius: 100px; height: 8px; width: 120px; min-width: 70px; overflow: hidden; }
.level-pct { font-size: 0.8rem; font-weight: 700; color: var(--espresso); font-family: var(--mono); min-width: 38px; }
.level-tag { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; border-radius: 100px; padding: 3px 10px; white-space: nowrap; }
.level-tag.adv { color: var(--white); background: var(--coffee-dark); }
.level-tag.int { color: var(--coffee-dark); background: rgba(139,94,60,0.14); }
.level-tag.fnd { color: var(--muted); background: var(--cream); }
@media (max-width: 640px) {
  .matrix-table thead { display: none; }
  .matrix-table tr { display: block; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
  .matrix-table td { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border: none; font-size: 0.85rem; }
  .matrix-table td::before { content: attr(data-label); font-weight: 600; color: var(--espresso); margin-right: 10px; flex-shrink: 0; }
  .matrix-table tbody tr:last-child td { border: none; }
  .matrix-table td:first-child { display: block; }
  .level-bar { width: 80px; }
  .level-wrap { flex-wrap: wrap; justify-content: flex-end; }
}

/* ===== PORTFOLIO PROJECT HIGHLIGHTS ===== */
.port-projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.port-project { display: flex; gap: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.port-project:hover { transform: translateY(-3px); box-shadow: 0 10px 28px var(--shadow); border-color: var(--coffee-light); }
.pp-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--cream); color: var(--coffee); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.pp-body { display: flex; flex-direction: column; gap: 8px; }
.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-head strong { font-size: 0.95rem; color: var(--espresso); }
.pp-status { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); background: var(--cream); border-radius: 100px; padding: 3px 10px; white-space: nowrap; }
.pp-status.active { color: var(--white); background: var(--coffee); }
.pp-body p { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pp-tags span { font-size: 0.7rem; font-weight: 500; color: var(--coffee-dark); background: rgba(139,94,60,0.08); border-radius: 100px; padding: 3px 9px; font-family: var(--mono); }
.port-projects-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 0.88rem; font-weight: 600; color: var(--coffee); transition: gap var(--transition); }
.port-projects-link:hover { gap: 12px; }
@media (max-width: 720px) { .port-projects { grid-template-columns: 1fr; } }

/* ===== PORTFOLIO CONTACT CTA ===== */
.port-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; background: var(--espresso); color: var(--white); border-radius: var(--radius); padding: 36px; }
.port-cta-text h2 { font-size: 1.6rem; margin-bottom: 8px; color: var(--white); }
.port-cta-text p { font-size: 0.95rem; color: var(--coffee-light); max-width: 44ch; }
.port-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.port-cta .btn-outline { color: var(--white); border-color: rgba(255,255,255,0.4); }
.port-cta .btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
@media (max-width: 640px) { .port-cta { padding: 28px; } .port-cta-actions { width: 100%; } .port-cta-actions .btn { flex: 1; justify-content: center; } }

/* ===== PROJECTS PAGE ===== */
.project-detail-list { display: flex; flex-direction: column; gap: 40px; }
.project-detail-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pd-header { display: flex; align-items: flex-start; gap: 20px; padding: 28px; background: var(--cream); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pd-icon { width: 52px; height: 52px; background: var(--white); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--coffee); flex-shrink: 0; }
.pd-header h2 { font-size: 1.4rem; margin-bottom: 10px; }
.pd-header .project-status { margin-left: auto; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-tags span { font-size: 0.72rem; font-weight: 600; background: var(--white); color: var(--coffee-dark); padding: 3px 10px; border-radius: 100px; border: 1px solid var(--border); }
.pd-body { padding: 28px; display: flex; flex-direction: column; gap: 24px; }
.pd-section h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--coffee); margin-bottom: 10px; }
.pd-section p { font-size: 0.92rem; color: var(--muted); }
.pd-section ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.pd-section ol li { font-size: 0.9rem; color: var(--muted); }
.screenshot-placeholder { background: var(--bg); border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 32px; text-align: center; color: var(--muted); }
.screenshot-placeholder i { font-size: 2rem; color: var(--border); margin-bottom: 10px; display: block; }
.screenshot-placeholder p { font-size: 0.85rem; }

/* ===== BLOG PAGE ===== */
.blog-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn { padding: 8px 20px; border-radius: 100px; border: 1.5px solid var(--border); background: var(--white); font-size: 0.83rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all var(--transition); }
.filter-btn:hover, .filter-btn.active { background: var(--coffee); color: var(--white); border-color: var(--coffee); }
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.blog-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; transition: all var(--transition); }
.blog-card:hover { border-color: var(--coffee-light); box-shadow: 0 8px 32px var(--shadow-md); transform: translateY(-4px); }
.blog-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 4px 12px; border-radius: 100px; display: inline-block; margin-bottom: 14px; width: fit-content; }
.blog-cat.soc { background: #dcfce7; color: #16a34a; }
.blog-cat.tryhackme { background: #fde8e8; color: #c0392b; }
.blog-cat.certs { background: #e8f4fd; color: #1d6fa4; }
.blog-cat.labs { background: #fef9c3; color: #ca8a04; }
.blog-card h3 { font-size: 0.97rem; font-weight: 700; color: var(--espresso); margin-bottom: 10px; line-height: 1.4; }
.blog-card p { font-size: 0.87rem; color: var(--muted); flex: 1; margin-bottom: 16px; }
.blog-meta { display: flex; gap: 16px; font-size: 0.78rem; color: var(--muted); margin-bottom: 16px; }
.blog-meta i { color: var(--coffee); margin-right: 4px; }
.blog-link { font-size: 0.85rem; font-weight: 600; color: var(--coffee); display: flex; align-items: center; gap: 6px; margin-top: auto; transition: gap var(--transition); }
.blog-link:hover { gap: 10px; }

/* ===== SECURITY PAGE ===== */
.sec-hero { background: linear-gradient(135deg, var(--espresso) 0%, #4a2c1a 100%); }
.sec-hero-badges { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.sec-hero-badges span { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.15); padding: 6px 16px; border-radius: 100px; font-size: 0.82rem; font-weight: 600; }
.sec-stats-section { background: var(--white); padding: 48px 28px; }
.sec-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.sec-stat { text-align: center; padding: 28px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.sec-stat-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin: 0 auto 14px; }
.sec-stat-icon.critical { background: #fde8e8; color: #c0392b; }
.sec-stat-icon.high { background: #fef3e2; color: #d97706; }
.sec-stat-icon.medium { background: #e8f4fd; color: #1d6fa4; }
.sec-stat-icon.low { background: #e8fdf0; color: #27ae60; }
.sec-stat-n { display: block; font-size: 1.8rem; font-weight: 700; color: var(--espresso); font-family: var(--serif); }
.sec-stat-l { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.sec-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.sec-toc { position: sticky; top: 88px; }
.toc-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.toc-card h3 { font-size: 0.9rem; font-weight: 700; color: var(--espresso); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.toc-card h3 i { color: var(--coffee); }
.toc-list { display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.toc-list li { counter-increment: toc; }
.toc-list a { display: flex; align-items: center; gap: 10px; font-size: 0.83rem; color: var(--muted); padding: 7px 10px; border-radius: var(--radius-sm); transition: all var(--transition); }
.toc-list a::before { content: counter(toc, decimal-leading-zero); font-size: 0.7rem; font-weight: 700; color: var(--coffee-light); font-family: var(--mono); min-width: 22px; }
.toc-list a:hover { background: var(--cream); color: var(--coffee-dark); }
.toc-note { margin-top: 16px; padding: 12px; background: var(--cream); border-radius: var(--radius-sm); display: flex; gap: 10px; }
.toc-note i { color: var(--coffee); margin-top: 2px; flex-shrink: 0; }
.toc-note p { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.sec-content { display: flex; flex-direction: column; gap: 28px; }
.sec-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow var(--transition); }
.sec-card:hover { box-shadow: 0 8px 32px var(--shadow-md); }
.sec-card-header { display: flex; align-items: center; gap: 16px; padding: 24px 28px; background: var(--bg); border-bottom: 1px solid var(--border); }
.sec-num { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: var(--border); min-width: 36px; }
.sec-icon { width: 46px; height: 46px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.sec-icon.critical { background: #fde8e8; color: #c0392b; }
.sec-icon.high { background: #fef3e2; color: #d97706; }
.sec-icon.medium { background: #e8f4fd; color: #1d6fa4; }
.sec-icon.low { background: #e8fdf0; color: #27ae60; }
.sec-card-header h2 { font-size: 1.2rem; margin-bottom: 6px; }
.sec-priority { font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; }
.critical-badge { background: #fde8e8; color: #c0392b; }
.high-badge { background: #fef3e2; color: #d97706; }
.medium-badge { background: #e8f4fd; color: #1d6fa4; }
.low-badge { background: #e8fdf0; color: #27ae60; }
.sec-card-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.sec-card-body > p { font-size: 0.93rem; color: var(--muted); }
.sec-list { display: flex; flex-direction: column; gap: 10px; }
.sec-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text); }
.sec-list i { color: #27ae60; margin-top: 3px; flex-shrink: 0; }
.sec-list code { background: var(--cream); color: var(--coffee-dark); padding: 1px 6px; border-radius: 4px; font-family: var(--mono); font-size: 0.82rem; }
.sec-code { background: var(--espresso); border-radius: var(--radius-sm); overflow: hidden; }
.sec-code-bar { background: #1a0f08; padding: 10px 16px; font-size: 0.75rem; color: rgba(255,255,255,0.4); font-family: var(--mono); }
.sec-code pre { padding: 16px 20px; overflow-x: auto; }
.sec-code code { font-family: var(--mono); font-size: 0.8rem; color: #a8d8a8; line-height: 1.8; }
.sec-tip { display: flex; align-items: flex-start; gap: 10px; background: #fef9c3; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 14px 16px; font-size: 0.87rem; color: #92400e; }
.sec-tip i { color: #d97706; margin-top: 2px; flex-shrink: 0; }
.sec-threats { display: flex; gap: 8px; flex-wrap: wrap; }
.threat { font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 100px; }
.threat.xss { background: #fde8e8; color: #c0392b; }
.threat.sqli { background: #fef3e2; color: #d97706; }
.threat.cmd { background: #e8f4fd; color: #1d6fa4; }
.headers-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.ht-row { display: grid; grid-template-columns: 220px 1fr 160px; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.83rem; align-items: center; }
.ht-row:last-child { border-bottom: none; }
.ht-row.ht-header { background: var(--cream); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.ht-row code { background: var(--cream); color: var(--coffee-dark); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 0.78rem; }
.cf-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-feat { display: flex; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.cf-feat i { font-size: 1.2rem; color: var(--coffee); margin-top: 2px; flex-shrink: 0; }
.cf-feat strong { font-size: 0.9rem; color: var(--espresso); display: block; margin-bottom: 4px; }
.cf-feat p { font-size: 0.82rem; color: var(--muted); }
.sec-callout { background: linear-gradient(135deg, var(--espresso), #4a2c1a); border-radius: var(--radius); padding: 36px; display: flex; gap: 24px; align-items: flex-start; }
.sec-callout-icon { font-size: 2.4rem; color: var(--coffee-light); flex-shrink: 0; }
.sec-callout h3 { font-size: 1.4rem; color: var(--white); margin-bottom: 10px; }
.sec-callout p { font-size: 0.93rem; color: rgba(255,255,255,0.65); }
.sec-callout strong { color: var(--coffee-light); }

/* ===== FOOTER ===== */
.footer { background: var(--espresso); color: rgba(255,255,255,0.6); padding: 56px 28px 28px; }
.footer-top { display: grid; grid-template-columns: 1fr 160px 160px; gap: 48px; margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .footer-logo { height: 36px; width: auto; border-radius: 6px; margin-bottom: 14px; }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.5); max-width: 280px; line-height: 1.7; }
.footer-links h5 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.4); margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.87rem; color: rgba(255,255,255,0.55); transition: color var(--transition); }
.footer-links a:hover { color: var(--coffee-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.83rem; }
.footer-bottom a { color: var(--coffee-light); }
.footer-made { color: rgba(255,255,255,0.35); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .projects-grid { grid-template-columns: repeat(2,1fr); }
  .certs-grid { grid-template-columns: repeat(2,1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; }
  .hero-right { flex: none; width: 100%; }
  .about-split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .skills-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .matrix-table, .matrix-table thead, .matrix-table tbody, .matrix-table tr, .matrix-table th, .matrix-table td { display: block; width: 100% !important; }
  .matrix-table thead { display: none; }
  .matrix-table tr { border-bottom: 1px solid var(--border); padding: 12px 0; }
  .matrix-table tbody tr:last-child { border-bottom: none; }
  .matrix-table td { border-bottom: none; padding: 4px 20px; }
  .matrix-table td::before { content: attr(data-label); display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 4px; }
  .pt-item { gap: 16px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 20px 28px; gap: 18px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .theme-toggle { margin-left: auto; }
  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; }
  .hstat { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============================================================
   ANIMATION 1: CUSTOM CURSOR
   Elements: .cursor-dot  .cursor-ring  (injected by JS)
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
}
.cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 99999;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coffee); pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
  will-change: left, top;
}
.cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 99998;
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--coffee); pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease,
              border-color 0.25s ease, background 0.25s ease,
              left 0.08s linear, top 0.08s linear;
  opacity: 0.6;
  will-change: left, top, width, height;
}
.cursor-ring.cursor-hover {
  width: 56px; height: 56px;
  border-color: var(--coffee-dark);
  background: rgba(139,94,60,0.08);
  opacity: 0.9;
}
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ============================================================
   ANIMATION 2: SCROLL TEXT REVEAL
   Add class="reveal-text" to any heading you want revealed.
   JS wraps the inner content automatically.
   ============================================================ */
.reveal-text { overflow: hidden; display: block; }
.reveal-text-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-text.revealed .reveal-text-inner { transform: translateY(0); }

/* ============================================================
   ANIMATION 3: PROJECT CARD HOVER IMAGE SWAP
   HTML structure needed inside .project-card:
     <div class="project-img-wrap">
       <img class="project-img-default" src="default.jpg" alt="">
       <img class="project-img-hover"   src="hover.jpg"   alt="">
     </div>
   ============================================================ */
.project-img-wrap {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 16px; aspect-ratio: 16 / 9;
  background: var(--cream);
}
.project-img-wrap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.45s ease;
}
.project-img-default { opacity: 1; }
.project-img-hover   { opacity: 0; }
.project-card:hover .project-img-default { opacity: 0; }
.project-card:hover .project-img-hover   { opacity: 1; }

/* ============================================================
   ANIMATION 4: SMOOTH PAGE TRANSITION
   Element: .page-overlay  (injected by JS into <body>)
   ============================================================ */
.page-overlay {
  position: fixed; inset: 0; z-index: 99997;
  background: var(--espresso);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}
.page-overlay.slide-in {
  pointer-events: all;
  animation: overlayIn 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.page-overlay.slide-out {
  animation: overlayOut 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
@keyframes overlayIn {
  from { transform: scaleY(0); transform-origin: bottom; }
  to   { transform: scaleY(1); transform-origin: bottom; }
}
@keyframes overlayOut {
  from { transform: scaleY(1); transform-origin: top; }
  to   { transform: scaleY(0); transform-origin: top; }
}

/* ============================================================
   ANIMATION 5: MARQUEE / TICKER TEXT
   Add a <section class="marquee-section"> block in your HTML.
   See index.html for the full markup pattern.
   ============================================================ */
.marquee-section {
  padding: 22px 0;
  background: var(--espresso);
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  display: flex; align-items: center; gap: 20px;
  padding: 0 40px;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  color: var(--coffee-light);
  white-space: nowrap; letter-spacing: 0.8px;
  text-transform: uppercase;
}
.marquee-sep {
  color: var(--coffee); font-size: 1rem; opacity: 0.7;
}
@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ════════════════════════════════════════════════════════════
   GRID BACKGROUND + THEME TOGGLE
   ════════════════════════════════════════════════════════════ */

/* Interactive grid background — pointer-events off so links
   beneath always work. Two pseudo-elements:
   ::before = always-visible base grid (very faint)
   ::after  = spotlight grid revealed only near cursor          */
#grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
#grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  transition: opacity var(--motion-duration-slow) var(--motion-ease-out);
}
#grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--glow-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--glow-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  -webkit-mask-image: radial-gradient(
    circle var(--glow-radius) at var(--mx, -9999px) var(--my, -9999px),
    black 0%, rgba(0,0,0,0.5) 45%, transparent 100%
  );
  mask-image: radial-gradient(
    circle var(--glow-radius) at var(--mx, -9999px) var(--my, -9999px),
    black 0%, rgba(0,0,0,0.5) 45%, transparent 100%
  );
  will-change: mask-image, -webkit-mask-image;
}

/* Ensure all page content sits above the grid */
main, footer { position: relative; z-index: 1; }
/* Header holds the fixed navbar and must stack above main content,
   otherwise the hero section overlaps and blocks the nav links. */
header { position: relative; z-index: 1000; }

/* ── THEME TOGGLE BUTTON ──────────────────────────────────── */
.theme-toggle {
  flex-shrink: 0;
  margin-left: 24px;
  z-index: 1100;
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--coffee-light);
  background: var(--cream);
  color: var(--coffee);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 6px var(--shadow-md);
  transition:
    border-color var(--motion-duration-base) var(--motion-ease-out),
    color        var(--motion-duration-base) var(--motion-ease-out),
    background   var(--motion-duration-base) var(--motion-ease-out),
    box-shadow   var(--motion-duration-base) var(--motion-ease-out),
    transform    var(--motion-duration-base) var(--motion-ease-spring);
}
.theme-toggle:hover {
  border-color: var(--coffee);
  color: var(--coffee-dark);
  background: var(--white);
  box-shadow: 0 4px 14px var(--shadow-md);
  transform: scale(1.08) rotate(15deg);
}
.theme-toggle:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}
.theme-toggle:active {
  transform: scale(0.93) rotate(20deg);
  transition-duration: var(--motion-duration-fast);
}
.theme-toggle svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-duration-slow) var(--motion-ease-spring),
              opacity   var(--motion-duration-base) var(--motion-ease-out);
}
/* Sun icon shown in dark mode, moon in light mode */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-reduced-motion: reduce) {
  .theme-toggle:hover { transform: none; }
  #grid-bg::before, #grid-bg::after { transition: none; }
}

/* ════════════════════════════════════════════════════════════
   VENICE INC. — TOKEN-DRIVEN UI SYSTEM
   Principal Design Engineer spec · techvrs.com
   ════════════════════════════════════════════════════════════ */

/* ── 1. ACCESSIBILITY — prefers-reduced-motion ──────────────
   WCAG 2.2 AA §2.3.3 (AAA) + §1.4.3
   Zero tolerance: kill every transform/animation for users
   who opt out. Layout must never shift as a side-effect.       */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:   0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:  0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-text-inner    { transform: none !important; }
  .cursor-dot,
  .cursor-ring          { display: none !important; }
  .page-overlay         { display: none !important; }
  .marquee-track        { animation: none !important; }
  [data-reveal]         { opacity: 1 !important; transform: none !important; }
}

/* ── 2. GLOBAL FOCUS-VISIBLE ────────────────────────────────
   Keyboard-first, pointer-safe. Focus ring appears ONLY on
   keyboard navigation (not on mouse click). Criterion: 3:1
   contrast vs adjacent colour (WCAG 2.4.11 AA).               */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ── 3. SCROLL-TRIGGERED STAGGER REVEAL ────────────────────
   Uses data-reveal / data-delay attributes set by JS.
   Only opacity + transform — zero CLS guaranteed.
   will-change declared here; JS removes it after transition.  */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity  var(--motion-duration-slow) var(--motion-ease-premium),
    transform var(--motion-duration-slow) var(--motion-ease-premium);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal][data-delay="1"] { transition-delay: calc(var(--motion-stagger-step) * 1); }
[data-reveal][data-delay="2"] { transition-delay: calc(var(--motion-stagger-step) * 2); }
[data-reveal][data-delay="3"] { transition-delay: calc(var(--motion-stagger-step) * 3); }
[data-reveal][data-delay="4"] { transition-delay: calc(var(--motion-stagger-step) * 4); }
[data-reveal][data-delay="5"] { transition-delay: calc(var(--motion-stagger-step) * 5); }
[data-reveal][data-delay="6"] { transition-delay: calc(var(--motion-stagger-step) * 6); }

/* ── 4. MICRO-INTERACTIONS — 1.02x scale ───────────────────
   Applied only to cards. translateY lift kept on non-card
   buttons. Scale + shadow change together = no CLS.          */
.service-card,
.cert-card,
.channel-card,
.blog-card,
.project-card {
  transition:
    transform  var(--motion-duration-base) var(--motion-ease-premium),
    box-shadow var(--motion-duration-base) var(--motion-ease-premium),
    border-color var(--motion-duration-base) var(--motion-ease-out);
  will-change: transform;
}
.service-card:hover,
.cert-card:hover,
.channel-card:hover,
.blog-card:hover {
  transform: scale(var(--scale-hover));
  box-shadow: 0 12px 40px var(--shadow-lg);
}
.project-card:hover {
  transform: scale(var(--scale-hover)) translateY(-2px);
  box-shadow: 0 14px 44px var(--shadow-lg);
}

/* ── 5. BUTTON — ALL COMPONENT STATES ──────────────────────
   Default · Hover · Focus-visible · Active · Disabled ·
   Loading. Each state is explicit and testable.              */

/* 5a. Primary button */
.btn-primary {
  background:    var(--coffee);
  color:         var(--white);
  border-color:  var(--coffee);
  transition:
    background    var(--motion-duration-base) var(--motion-ease-out),
    border-color  var(--motion-duration-base) var(--motion-ease-out),
    transform     var(--motion-duration-base) var(--motion-ease-premium),
    box-shadow    var(--motion-duration-base) var(--motion-ease-out);
  will-change: transform;
}
.btn-primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background:   var(--coffee-dark);
  border-color: var(--coffee-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139,94,60,0.30);
}
.btn-primary:focus-visible {
  box-shadow: var(--focus-ring), 0 8px 24px rgba(139,94,60,0.20);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  transform: scale(var(--scale-active)) translateY(0);
  box-shadow: none;
  transition-duration: var(--motion-duration-fast);
}
.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}
.btn-primary[data-loading="true"] {
  pointer-events: none;
  opacity: 0.75;
  position: relative;
  color: transparent;
}
.btn-primary[data-loading="true"]::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: var(--white);
  border-radius: var(--radius-full);
  animation: btnSpin var(--motion-duration-crawl) linear infinite;
}

/* 5b. Outline button */
.btn-outline {
  background:   transparent;
  color:        var(--coffee-dark);
  border-color: var(--coffee-light);
  transition:
    background   var(--motion-duration-base) var(--motion-ease-out),
    border-color var(--motion-duration-base) var(--motion-ease-out),
    transform    var(--motion-duration-base) var(--motion-ease-premium),
    box-shadow   var(--motion-duration-base) var(--motion-ease-out);
  will-change: transform;
}
.btn-outline:hover:not(:disabled) {
  background:   var(--cream);
  border-color: var(--coffee);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}
.btn-outline:focus-visible {
  box-shadow: var(--focus-ring);
  transform: translateY(-1px);
}
.btn-outline:active:not(:disabled) {
  transform: scale(var(--scale-active));
  box-shadow: none;
  transition-duration: var(--motion-duration-fast);
}
.btn-outline:disabled,
.btn-outline[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── 6. FORM INPUTS — COMPONENT STATES ─────────────────────
   Default · Hover · Focus-visible · Error · Disabled        */
input, select, textarea {
  transition:
    border-color var(--motion-duration-fast) var(--motion-ease-out),
    box-shadow   var(--motion-duration-fast) var(--motion-ease-out);
}
input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: var(--coffee-light);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--coffee);
  box-shadow: var(--focus-ring);
  outline: none;
}
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  background: var(--cream);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.22);
}

/* ── 7. NAV LINKS — COMPONENT STATES ───────────────────────  */
.nav-links a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}

/* ── 8. CHANNEL & CERT CARDS — FOCUS-VISIBLE ───────────────  */
.channel-card:focus-visible,
.project-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ── 9. HERO SOCIALS — COMPONENT STATES ────────────────────  */
.hero-socials a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.hero-socials a:active {
  transform: scale(var(--scale-active));
  transition-duration: var(--motion-duration-fast);
}

/* ── 10. SKIP LINK — KEYBOARD ACCESSIBLE ───────────────────  */
.skip-link:focus-visible {
  top: 16px;
  box-shadow: var(--focus-ring);
  outline: none;
}

/* ── 11. HAMBURGER BUTTON — STATES ─────────────────────────  */
.hamburger:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}
.hamburger:active span {
  background: var(--coffee);
  transition-duration: var(--motion-duration-fast);
}

/* ── 12. SPINNER KEYFRAME (loading state) ───────────────────  */
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

/* ── 13. PERFORMANCE — will-change cleanup ──────────────────
   After animation completes, JS removes will-change via
   .anim-done class to free compositor layers.               */
.anim-done {
  will-change: auto !important;
}
