/* ==========================================================================
   Mohit Nandasana — Portfolio  |  style.css
   Palette: warm cream (light) / warm dark (dark)  +  burnt-orange accent
   Fonts: Lora (headings)  +  JetBrains Mono (labels/mono)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS — Light & Dark
   -------------------------------------------------------------------------- */
:root {
  /* ── Light palette ── */
  --bg:           #F6F2EB;
  --bg-alt:       #EDE8DE;
  --surface:      #FFFFFF;
  --ink:          #1A1814;
  --ink-light:    #3A342A;
  --ink-muted:    #8A7E6E;
  --accent:       #C45826;
  --accent-hover: #D96530;
  --accent-dim:   rgba(196,88,38,0.10);
  --rule:         #D5CEC0;
  --tag-bg:       #E9E3D6;
  --shadow:       rgba(28,24,18,0.09);

  /* ── Font faces ── */
  --font-serif:   'Lora', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-body:    'Source Serif 4', Georgia, serif;

  /* ── Spacing ── */
  --sp-xs: .4rem;  --sp-sm: .85rem;  --sp-md: 1.6rem;
  --sp-lg: 3rem;   --sp-xl: 5.5rem;  --sp-2xl: 8rem;

  --max-w:    1120px;
  --nav-h:    66px;
  --sec-pad:  7rem;
  --radius:   4px;
}

[data-theme="dark"] {
  --bg:        #0E0D0B;
  --bg-alt:    #141210;
  --surface:   #1C1A16;
  --ink:       #F0EBE1;
  --ink-light: #C4BAA6;
  --ink-muted: #7A6E5C;
  --accent:    #E06830;
  --accent-hover: #F07840;
  --accent-dim:   rgba(224,104,48,0.12);
  --rule:      #262218;
  --tag-bg:    #1E1C17;
  --shadow:    rgba(0,0,0,0.35);
}

/* --------------------------------------------------------------------------
   2. RESET + BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 17px;           /* â† slightly larger base */
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  transition: background .25s ease, color .25s ease;

  /* Subtle warm dot-grid */
  background-image: radial-gradient(circle, rgba(180,165,140,.55) 1px, transparent 1px);
  background-size: 30px 30px;
  background-attachment: fixed;
}

[data-theme="dark"] body {
  background-image: radial-gradient(circle, rgba(60,52,38,.5) 1px, transparent 1px);
}

img   { max-width: 100%; display: block; }
a     { color: inherit; text-decoration: none; }
ul,ol { list-style: none; }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1,h2,h3,h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; }

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); letter-spacing: .02em; }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }

p  { font-size: 1.08rem; color: var(--ink-light); line-height: 1.85; }

.mono { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%; max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

section { padding: var(--sec-pad) 0; }

/* Section heading block — accent left-border treatment */
.sec-head { margin-bottom: 3.5rem; }

.sec-head h2 {
  position: relative;
  display: inline-block;
  padding-left: 1.2rem;
}

.sec-head h2::before {
  content: '';
  position: absolute;
  left: 0; top: .15em; bottom: .1em;
  width: 4px;
  background: var(--accent);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--sp-md); }
}

/* --------------------------------------------------------------------------
   5. NAVIGATION
   -------------------------------------------------------------------------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 200;
  display: flex; align-items: center;
  background: rgba(246,242,235,.93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .3s, background .25s, border-color .25s;
}

[data-theme="dark"] #nav {
  background: rgba(14,13,11,.93);
}

#nav.scrolled { box-shadow: 0 3px 18px var(--shadow); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 var(--sp-lg);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: .02em; color: var(--ink);
}
.nav-logo span { color: var(--accent); }

/* Nav links */
.nav-links {
  display: flex; gap: var(--sp-lg); align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted);
  position: relative; padding-bottom: 2px;
  transition: color .2s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width .25s cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover,
.nav-links a.active          { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after   { width: 100%; }

/* Nav right cluster */
.nav-right { display: flex; align-items: center; gap: var(--sp-md); }

/* ── Dark Mode Toggle ── */
.theme-toggle {
  width: 38px; height: 38px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  color: var(--ink-muted);
  transition: background .2s, border-color .2s, color .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--tag-bg); color: var(--ink); }

/* Show sun in dark, moon in light */
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--ink); transition: all .3s ease; transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    flex-direction: column; gap: 0;
    padding: var(--sp-md) var(--sp-lg); align-items: flex-start;
  }
  .nav-links.open    { display: flex; }
  .nav-links a       { padding: var(--sp-sm) 0; font-size: .88rem;
                       border-bottom: 1px solid var(--rule); width: 100%; }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle        { display: flex; }
  .nav-inner         { padding: 0 var(--sp-md); }
}

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--nav-h); padding-bottom: var(--sp-xl);
  position: relative; overflow: hidden;
}

/* Decorative large faint initials behind hero */
#hero::after {
  content: 'MN';
  position: absolute;
  right: -0.05em; bottom: -0.15em;
  font-family: var(--font-serif);
  font-size: clamp(14rem, 28vw, 26rem);
  font-weight: 700;
  color: rgba(196,88,38,.04);
  line-height: 1;
  pointer-events: none; user-select: none;
  z-index: 0;
}

.hero-inner {
  padding: 0 var(--sp-lg);
  max-width: var(--max-w);
  margin: 0 auto; width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center; gap: var(--sp-xl);
  position: relative; z-index: 1;
}

/* ── Badge ── */
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .07em; color: var(--ink-muted);
  border: 1px solid var(--rule); padding: .35rem .85rem;
  background: var(--tag-bg); margin-bottom: var(--sp-md);
  border-radius: var(--radius);
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.75); }
}

.hero-eyebrow {
  font-family: var(--font-mono); font-size: .82rem;
  letter-spacing: .06em; color: var(--ink-muted);
  margin-bottom: var(--sp-sm);
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  font-weight: 700; line-height: 1.0;
  letter-spacing: -.015em;
  margin-bottom: var(--sp-md);
  color: var(--ink);
}

/* ── Typewriter ── */
.hero-typewriter {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 500; min-height: 2rem;
  display: flex; align-items: center;
  margin-bottom: var(--sp-md);
}
.tw-arrow { color: var(--accent); user-select: none; }
#tw-text  { color: var(--ink); }
.tw-cursor {
  display: inline-block; color: var(--accent);
  font-weight: 300; margin-left: 1px;
  animation: blink .85s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-tagline {
  font-size: 1.08rem; color: var(--ink-light);
  max-width: 44ch; line-height: 1.8;
  margin-bottom: var(--sp-sm);
}
.hero-sub {
  font-size: .95rem; color: var(--ink-muted);
  max-width: 46ch; line-height: 1.75;
  margin-bottom: var(--sp-lg);
}

/* CTA row */
.hero-actions {
  display: flex; gap: var(--sp-md); flex-wrap: wrap;
  margin-bottom: var(--sp-md);
}

.btn-primary {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent); color: #fff;
  padding: .72rem 1.6rem; border: 1px solid var(--accent);
  border-radius: var(--radius); cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  background: transparent; color: var(--ink-light);
  padding: .72rem 1.6rem; border: 1px solid var(--rule);
  border-radius: var(--radius); cursor: pointer;
  transition: border-color .2s, color .2s, transform .15s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--ink-muted); color: var(--ink); transform: translateY(-1px); }

/* Social icon buttons */
.hero-social-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
.hero-social-links .social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: 21px;
  color: var(--ink-muted);
  background: var(--surface);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px var(--shadow);
  gap: 8px;
  flex-shrink: 0;
}
.hero-social-links .social-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--accent-dim);
}
.hero-social-links .social-icon-btn .btn-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}
.hero-mail-btn {
  background: var(--accent-dim) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.hero-mail-btn:hover {
  background: var(--accent) !important;
  color: #ffffff !important;
}

/* ── Hero Right — Center the terminal card ── */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  padding-right: 1rem; /* prevent shadow bleed */
}

/* ── Code Terminal ── */
.code-terminal {
  background: #13110F;
  border: 1px solid #222018;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 8px 8px 0 rgba(196,88,38,.12);
  width: 100%;
  max-width: 440px;
}
[data-theme="dark"] .code-terminal { box-shadow: 12px 12px 0 rgba(0,0,0,.4); }

.term-header {
  display: flex; align-items: center; gap: .45rem;
  padding: .8rem 1.1rem;
  background: #1C1A15; border-bottom: 1px solid #222018;
}
.tdot { width: 11px; height: 11px; border-radius: 50%; }
.tdot-r { background: #FF5F57; }
.tdot-y { background: #FFBD2E; }
.tdot-g { background: #28CA41; }
.term-title {
  font-family: var(--font-mono); font-size: .72rem;
  color: #5A5448; margin-left: auto; letter-spacing: .04em;
}
.term-body { padding: var(--sp-md) var(--sp-md); }
.term-body pre {
  font-family: var(--font-mono); font-size: .76rem;
  line-height: 1.8; white-space: pre-wrap; word-break: break-word;
  overflow-x: hidden;
  color: #D5CEC0;
}
.c-comment  { color: #5A6A4A; font-style: italic; }
.c-keyword  { color: var(--accent); }
.c-class    { color: #E8D5B0; font-weight: 600; }
.c-type     { color: #9CC9D8; }
.c-str      { color: #A8C97A; }
.c-bool     { color: #CF9FFF; }

.term-output {
  margin-top: var(--sp-md); padding-top: var(--sp-sm);
  border-top: 1px solid #222018;
  font-family: var(--font-mono); font-size: .76rem;
  line-height: 2; color: #7A7060;
}
.t-prompt { color: var(--accent); }
.t-ok     { color: #28CA41; }



@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .hero-right { padding-right: 0; justify-content: flex-start; overflow: visible; width: 100%; }
  .code-terminal { display: block !important; width: 100%; max-width: 100%; }
  #hero::after { font-size: 10rem; }
}
@media (max-width: 768px) {
  #hero { min-height: auto; padding-top: calc(var(--nav-h) + var(--sp-xl)); }
  .hero-inner { padding: 0 var(--sp-md); }
  .hero-scroll { left: var(--sp-md); }
  .hero-right { width: 100%; overflow: visible; }
  .code-terminal { display: block !important; width: 100%; max-width: 100%; }
  .term-body pre { font-size: .7rem; }
  .term-output { font-size: .7rem; }
}
@media (max-width: 480px) {
  .hero-right { width: 100%; overflow: visible; }
  .code-terminal { display: block !important; width: 100%; max-width: 100%; }
  .term-body { padding: var(--sp-sm); }
  .term-body pre { font-size: .65rem; line-height: 1.7; }
  .term-output { font-size: .65rem; }
}

/* --------------------------------------------------------------------------
   7. ABOUT  (#about)
   -------------------------------------------------------------------------- */
#about { background: var(--bg-alt); }

/* About: single column main text */
.about-text { max-width: 70ch; }
.about-text p { margin-bottom: var(--sp-md); font-size: 1.1rem; }
.about-text p:first-child { font-size: 1.15rem; color: var(--ink); }

/* ── About two-column layout ── */
.about-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--sp-2xl);
  align-items: start;
  margin-bottom: var(--sp-2xl);
}

/* Photo column */
.about-photo-col {
  position: sticky;
  top: calc(var(--nav-h) + var(--sp-lg));
}

/* ── About Photo Card & Vercel-style effects ── */
.about-photo-card-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
}

/* Glow background animate-pulse */
.about-photo-glow {
  position: absolute;
  top: -8px; left: -8px; right: -8px; bottom: -8px;
  background: linear-gradient(135deg, rgba(196,88,38,0.15), rgba(99,102,241,0.15), rgba(59,130,246,0.15));
  border-radius: 32px;
  filter: blur(20px);
  z-index: 0;
  animation: glow-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* Outer Card Frame */
.about-photo-card {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85); /* light theme */
  border: 1px solid var(--rule);
  box-shadow: 0 16px 48px var(--shadow);
  border-radius: 24px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
[data-theme="dark"] .about-photo-card {
  background: rgba(28, 26, 22, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Inner Frame containing img */
.about-photo-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg-alt);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .about-photo-inner {
  background: #09090b;
  border-color: rgba(255, 255, 255, 0.04);
}

/* Dot grid overlay on photo inner — removed */
.about-photo-grid-overlay {
  display: none;
}

/* Photo style with grayscale transitions */
.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.7s ease, transform 0.7s ease;
  z-index: 1;
}

/* Hover effects */
.about-photo-card-wrap:hover .about-photo {
  filter: grayscale(0%);
  transform: scale(1.06);
}
.about-photo-card-wrap:hover .about-photo-card {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px var(--shadow);
}

/* Absolute badges on image box */
.about-photo-badge {
  position: absolute;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  pointer-events: none;
}
.badge-top {
  top: 12px; left: 12px;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.badge-bottom {
  bottom: 12px; right: 12px;
  background: rgba(196, 88, 38, 0.1);
  color: var(--accent);
  border: 1px solid rgba(196, 88, 38, 0.2);
}

/* Content column */
.about-content-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

/* Identity tags */
.about-tags {
  display: flex; flex-wrap: wrap; gap: var(--sp-xs);
  margin-bottom: 0;
}
.about-tag {
  font-family: var(--font-mono); font-size: .73rem;
  letter-spacing: .07em;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(196,88,38,.22);
  padding: .22rem .65rem; border-radius: 2px;
}

/* Blockquote */
.about-quote {
  margin: var(--sp-lg) 0;
  padding: var(--sp-md) var(--sp-lg);
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.08rem; color: var(--ink-light); line-height: 1.7;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Education callout */
.edu-callout {
  margin-top: var(--sp-lg);
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex; gap: var(--sp-md); align-items: center;
}
.edu-accent {
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); writing-mode: vertical-rl;
  transform: rotate(180deg); user-select: none;
}
.edu-details h4 {
  font-family: var(--font-serif); font-size: 1.05rem;
  font-weight: 600; margin-bottom: .2rem;
}
.edu-details p  { font-size: .93rem; color: var(--ink-muted); margin: 0; }
.edu-duration   { display: block; font-family: var(--font-mono);
                  font-size: .72rem; color: var(--ink-muted); margin-top: .25rem; }

/* ── Stats row — 4 separate boxes side by side ── */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
  margin-top: var(--sp-2xl);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--sp-lg) var(--sp-md);
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s;
}
.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px var(--shadow);
  border-color: var(--accent);
}
.stat-number {
  font-family: var(--font-serif);
  font-size: 2.6rem; font-weight: 700;
  color: var(--accent); line-height: 1;
  display: block; margin-bottom: .4rem;
}
.stat-label {
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-muted);
}

@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }
  .about-photo-col {
    position: static;
    display: flex;
    justify-content: center;
    margin-bottom: var(--sp-md);
  }
  .about-photo-wrap {
    width: 300px;
  }
}

@media (max-width: 700px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   8. TECH ARSENAL  (#arsenal)
   -------------------------------------------------------------------------- */
.skills-groups { display: flex; flex-direction: column; }

.skill-group {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: var(--sp-lg); align-items: start;
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--rule);
}
.skill-group:first-child { border-top: 1px solid var(--rule); }

.skill-group-name {
  font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted); padding-top: .3rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.skill-tag {
  font-family: var(--font-mono); font-size: .78rem;
  background: var(--tag-bg); color: var(--ink-light);
  padding: .32rem .75rem; border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: background .2s, border-color .2s, color .2s;
  cursor: default;
}
.skill-tag:hover {
  background: var(--bg-alt); border-color: var(--accent); color: var(--ink);
}

@media (max-width: 560px) {
  .skill-group { grid-template-columns: 1fr; gap: var(--sp-sm); }
}

/* --------------------------------------------------------------------------
   9. EXPERIENCE & EDUCATION  (#milestones)
   -------------------------------------------------------------------------- */
#milestones { background: var(--bg-alt); }

.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
  content: ''; position: absolute;
  left: 0; top: .6rem; bottom: 0;
  width: 1px; background: var(--rule);
}
.timeline-item { position: relative; margin-bottom: var(--sp-xl); }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: ''; position: absolute;
  left: -2.2rem; top: .5rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg-alt); border: 2px solid var(--accent);
  transform: translateX(-3.5px);
}
.tl-edu::before { background: var(--accent); width: 10px; height: 10px; top: .43rem; }

.tl-date {
  font-family: var(--font-mono); font-size: .73rem;
  letter-spacing: .06em; color: var(--accent);
  display: block; margin-bottom: var(--sp-xs);
}
.tl-role {
  font-family: var(--font-serif); font-size: 1.2rem;
  font-weight: 600; color: var(--ink); margin-bottom: .15rem;
}
.tl-org  { font-size: .92rem; color: var(--ink-muted); margin-bottom: var(--sp-sm); }
.tl-desc { font-size: .98rem; color: var(--ink-light); max-width: 58ch; line-height: 1.78; }

/* --------------------------------------------------------------------------
   10. PROJECT COMMAND CENTER  (#projects)   — 3-column card grid
   -------------------------------------------------------------------------- */
#projects {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Faint background glow for projects section */
#projects::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 500px; height: 500px;
  background: rgba(99, 102, 241, 0.04);
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

#projects .sec-head h2 {
  color: var(--ink);
}
#projects .sec-head h2::before {
  background: var(--accent);
}

/* Filter tabs */
.proj-filters {
  display: flex; gap: var(--sp-xs); flex-wrap: wrap;
  margin-bottom: var(--sp-xl);
  background: var(--tag-bg);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  width: fit-content;
}
.filter-btn {
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 0.5rem 1rem;
  background: transparent; color: var(--ink-muted);
  border: 1px solid transparent; border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn.active {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--rule);
  box-shadow: 0 4px 12px var(--shadow);
}

/* ── 3-column project card grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  position: relative;
  z-index: 1;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 24px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  min-height: 320px;
  transition: transform .35s cubic-bezier(.25,.46,.45,.94), 
              box-shadow .35s ease, 
              border-color .35s ease,
              background .35s ease;
  cursor: pointer;
}

/* ColorGrade Subtle Backdrops */
.project-card[data-category="fullstack"] {
  border-color: rgba(59, 130, 246, 0.18);
}
.project-card[data-category="fullstack"]:hover {
  border-color: rgba(59, 130, 246, 0.45);
}

.project-card[data-category="frontend"] {
  border-color: rgba(244, 63, 94, 0.18);
}
.project-card[data-category="frontend"]:hover {
  border-color: rgba(244, 63, 94, 0.45);
}

.project-card[data-category="cloud"] {
  border-color: rgba(245, 158, 11, 0.18);
}
.project-card[data-category="cloud"]:hover {
  border-color: rgba(245, 158, 11, 0.45);
}

.project-card[data-category="hardware"] {
  border-color: rgba(20, 184, 166, 0.18);
}
.project-card[data-category="hardware"]:hover {
  border-color: rgba(20, 184, 166, 0.45);
}

/* Card top accent line */
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1.5px; 
  background: linear-gradient(to right, transparent, var(--accent-dim), transparent);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow);
  background: var(--bg-alt);
}

/* Highlight elements inside card on hover */
.project-card:hover .proj-title {
  color: var(--accent) !important;
}
.project-card:hover .proj-desc {
  color: var(--ink) !important;
}
.project-card:hover .proj-explore {
  color: var(--accent) !important;
}
.project-card:hover .explore-arrow {
  transform: translateX(4px);
}
.project-card:hover .stack-tag {
  border-color: var(--accent) !important;
  color: var(--ink) !important;
  background: var(--accent-dim) !important;
}
.project-card:hover .proj-status {
  color: var(--ink-light) !important;
}

/* Hidden filtered items */
.project-card.hidden { display: none; }

.proj-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-md);
}
.proj-cat {
  font-family: var(--font-mono); font-size: .62rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; 
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(196, 88, 38, 0.22);
  padding: 2px 8px;
  border-radius: 6px;
}
.proj-status {
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .06em; color: var(--ink-muted);
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.project-card:hover .proj-status {
  color: var(--ink-light) !important;
}

.proj-title {
  font-family: var(--font-serif); font-size: 1.25rem;
  font-weight: 700; color: var(--ink);
  margin-bottom: var(--sp-xs);
  transition: color 0.3s ease;
}
.proj-desc {
  font-size: 0.88rem; color: var(--ink-muted);
  line-height: 1.6; margin-bottom: var(--sp-md);
  flex: 1;   /* push stack to bottom */
  transition: color 0.3s ease;
  font-weight: 300;
}
.proj-stack {
  display: flex; flex-wrap: wrap; gap: var(--sp-xs);
  margin-bottom: var(--sp-md);
  align-items: center;
}
.stack-tag {
  font-family: var(--font-mono); font-size: .64rem;
  background: var(--tag-bg);
  color: var(--ink-muted);
  padding: .15rem .5rem; 
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: all 0.3s ease;
}
.tag-counter {
  color: var(--ink-muted);
  background: var(--tag-bg);
  border: 1px solid var(--rule);
  font-weight: bold;
}

/* Explore specs row */
.proj-explore {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  transition: color 0.3s ease;
  margin-bottom: var(--sp-sm);
  padding-bottom: var(--sp-sm);
}
.explore-arrow {
  transition: transform 0.2s ease;
}

/* Project Actions row */
.proj-actions {
  display: flex;
  gap: var(--sp-xs);
  margin-top: auto;
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--rule);
}

.btn-proj {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-code {
  background: var(--tag-bg);
  color: var(--ink-light);
  border: 1px solid var(--rule);
}
.btn-code:hover {
  background: var(--bg-alt);
  color: var(--ink);
  border-color: var(--ink-muted);
}
.btn-code svg {
  transition: transform 0.2s;
}
.btn-code:hover svg {
  transform: scale(1.1);
}

.btn-live {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}
.btn-live:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 12px var(--accent-dim);
}

@media (max-width: 980px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   11. CERTIFICATIONS  (#certifications)  — card grid with badge + pop-out
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   11. CERTIFICATIONS  (#certifications) — premium dark preview cards
   -------------------------------------------------------------------------- */
#certifications { background: var(--bg-alt); }

.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── Card container ── */
.cert-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease;
  will-change: transform;
}

.cert-card:hover {
  transform: translateY(-10px) scale(1.03);
  border-color: var(--accent);
  box-shadow: 0 20px 40px var(--shadow);
  z-index: 5;
}

/* Optional Image Overlay */
.cert-card:has(.cert-img-slot img)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 11, 15, 0.65) 0%, rgba(10, 11, 15, 0.9) 70%, #0f1015 100%);
  z-index: 1;
  pointer-events: none;
  border-radius: 16px;
}

.cert-img-slot {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 16px;
  overflow: hidden;
}

.cert-img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
}

.cert-card:hover .cert-img-slot img {
  transform: scale(1.06);
  opacity: 0.6;
}

/* Card content wrapper */
.cert-card > *:not(.cert-img-slot) {
  position: relative;
  z-index: 2;
}

/* Top header: Badge + Date */
.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.cert-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Badge variants */
.badge-cloud {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-standard-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-standard-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.cert-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cert-date i {
  font-style: normal;
  font-size: 0.65rem;
  opacity: 0.6;
}

/* Card titles */
.cert-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 0.4rem 0;
  letter-spacing: -0.01em;
}

.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin: 0 0 1.2rem 0;
}

/* Green validation info box */
.cert-verify-box {
  display: flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 1.2rem;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover .cert-verify-box {
  background: rgba(16, 185, 129, 0.09);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.cert-verify-label {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  line-height: 1.2;
  color: rgba(74, 222, 128, 0.55);
  font-weight: 600;
  margin-right: 12px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.cert-verify-value {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.4;
  color: #10b981;
  word-break: break-all;
  flex-grow: 1;
}

.cert-icon {
  margin-left: 2px;
  color: var(--ink-muted);
  opacity: 0.5;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.cert-card:hover .cert-icon {
  opacity: 0.95;
  color: var(--ink-light);
  transform: scale(1.18);
}

/* Card footer and verify button */
.cert-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.verify-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 2px;
}

.cert-card:hover .verify-btn {
  color: var(--accent-hover);
  transform: translateX(4px);
}

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





/* --------------------------------------------------------------------------
   12. CONTACT  (#contact)
   -------------------------------------------------------------------------- */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl); margin-bottom: var(--sp-2xl);
}

.contact-details { display: flex; flex-direction: column; gap: var(--sp-lg); }
.contact-link-group { display: flex; flex-direction: column; gap: .25rem; }

.contact-link-label {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.contact-link {
  font-size: 1rem; color: var(--ink-light);
  display: inline-block; position: relative; padding-bottom: 1px;
}
.contact-link::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width .25s ease;
}
.contact-link:hover { color: var(--ink); }
.contact-link:hover::after { width: 100%; }

.contact-social-logos {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.6rem;
}
.contact-logo-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.contact-logo-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-light);
  transition: color 0.2s ease;
}
.contact-logo-item:hover .contact-logo-text {
  color: var(--accent);
}
.contact-logo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-muted);
  background: var(--surface);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px var(--shadow);
  flex-shrink: 0;
}
.contact-logo-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px var(--accent-dim);
}
.contact-mail-btn {
  width: auto;
  padding: 0 1.2rem;
  border-radius: 24px;
  gap: 8px;
}
.contact-mail-btn .btn-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
}

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: var(--sp-md); }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label {
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted);
}
.form-input {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule);
  padding: .7rem .9rem; outline: none; width: 100%;
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.form-input::placeholder { color: var(--ink-muted); font-size: .95rem; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-textarea { resize: vertical; min-height: 110px; }
.form-submit { align-self: flex-start; border: none; cursor: pointer; }

@media (max-width: 840px) {
  .contact-layout { grid-template-columns: 1fr; gap: var(--sp-xl); }
}

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--rule);
  gap: var(--sp-lg);
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: .35rem; text-align: left; }
.footer-name {
  font-family: var(--font-serif); font-size: 1.15rem;
  font-weight: 600; color: var(--ink);
}
.footer-subtitle {
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .06em; color: var(--ink-muted);
}
.footer-api {
  font-family: var(--font-mono); font-size: .65rem;
  letter-spacing: .04em; color: rgba(196,88,38,.45);
}
.footer-right {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.footer-socials { display: flex; gap: var(--sp-md); }
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-muted);
  background: var(--surface);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px var(--shadow);
}
.footer-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px var(--accent-dim);
}
.footer-admin-link:hover {
  color: var(--accent) !important;
}
.footer-back-top-circle {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-muted);
  background: var(--surface);
  box-shadow: 0 6px 20px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-back-top-circle.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.footer-back-top-circle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--accent-dim);
}
.footer-back-top-circle svg {
  transition: transform 0.3s ease;
}
.footer-back-top-circle:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .footer-bar {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-md);
  }
  .footer-brand {
    align-items: center;
    text-align: center;
  }
  .footer-right {
    justify-content: center;
  }
  .footer-admin-wrap {
    align-items: center !important;
  }
}

/* --------------------------------------------------------------------------
   14. SCROLL REVEAL
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: .19s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: .26s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: .33s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: .40s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: .47s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: .54s; }
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity:1; transform:none; transition:none; }
  html { scroll-behavior: auto; }
  .hero-scroll { animation:none; opacity:1; }
  .tw-cursor  { animation:none; }
  .badge-dot  { animation:none; }
}