/* ===================================================================
   Suriyaa N S — Developer Portfolio
   Design: terminal / git-log inspired dev aesthetic
=================================================================== */

:root{
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

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

  --maxw: 1120px;
  --nav-h: 72px;

  --ease: cubic-bezier(.16,.84,.44,1);

  /* ---- Dark theme (default) ---- */
  --bg: #090d16;
  --bg-elevated: #0d1220;
  --surface: #111827;
  --surface-2: #161f33;
  --border: #232f4a;
  --border-soft: #1a2438;
  --text: #dce3f0;
  --text-muted: #8593ad;
  --text-faint: #56698a;
  --accent: #4fd1c5;
  --accent-strong: #7ce8dd;
  --accent-2: #f0b429;
  --accent-rgb: 79,209,197;
  --accent-2-rgb: 240,180,41;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.6);
  --code-bg: #0c1220;
}

html[data-theme="light"]{
  --bg: #f4f6fa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --border: #dde3ee;
  --border-soft: #e5eaf3;
  --text: #16202f;
  --text-muted: #5a6a82;
  --text-faint: #8794a8;
  --accent: #0c8f89;
  --accent-strong: #077571;
  --accent-2: #b45309;
  --accent-rgb: 12,143,137;
  --accent-2-rgb: 180,83,9;
  --shadow: 0 20px 50px -24px rgba(30,41,59,.25);
  --code-bg: #eef3f4;
}

*{ box-sizing: border-box; margin:0; padding:0; }

html{ scroll-behavior:smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s var(--ease), color .35s var(--ease);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration: .001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

.section-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

a{ color:inherit; text-decoration:none; }

code, .mono{ font-family: var(--font-mono); }

/* faint dot-grid backdrop */
.noise-overlay{
  position: fixed; inset:0; pointer-events:none; z-index:1;
  background-image: radial-gradient(circle, rgba(var(--accent-rgb),.10) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity:.35;
}

/* ===================== NAV ===================== */
.nav{
  position: fixed; top:0; left:0; right:0; z-index:100;
  height: var(--nav-h);
  background: rgba(9,13,22,.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
  transition: background .35s var(--ease), border-color .35s var(--ease);
}
html[data-theme="light"] .nav{ background: rgba(244,246,250,.78); }

.nav-inner{
  max-width: var(--maxw);
  margin:0 auto; padding: 0 32px;
  height:100%;
  display:flex; align-items:center; justify-content:space-between;
  gap: 24px;
}

.brand{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.02em;
  display:flex; align-items:center; gap:2px;
  color: var(--text);
}
.brand-at{ color: var(--accent); }
.brand-caret{
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity:0; } }

.nav-links{
  display:flex; align-items:center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.nav-link{
  display:flex; align-items:baseline; gap:1px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-link:hover{ color: var(--text); background: var(--surface-2); }
.nav-ext{ color: var(--accent); opacity:.75; font-size: 12px; }

.nav-actions{ display:flex; align-items:center; gap:10px; }

.theme-toggle{
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor:pointer;
  transition: border-color .2s, transform .2s, background .2s;
}
.theme-toggle:hover{ border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg{ width:18px; height:18px; }
.theme-toggle .icon-moon{ display:none; }
html[data-theme="light"] .theme-toggle .icon-sun{ display:none; }
html[data-theme="light"] .theme-toggle .icon-moon{ display:block; }

.nav-burger{
  display:none;
  width:38px; height:38px;
  border-radius: var(--radius-sm);
  border:1px solid var(--border);
  background: var(--surface);
  cursor:pointer;
  flex-direction:column; align-items:center; justify-content:center; gap:4px;
}
.nav-burger span{ width:16px; height:2px; background: var(--text); border-radius:2px; }

/* ===================== HERO ===================== */
.hero{
  position: relative;
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 96px;
  overflow: hidden;
}
.hero-grid{
  position:absolute; inset: 0 -10% auto -10%; height: 620px;
  background:
    linear-gradient(var(--border-soft) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
          mask-image: linear-gradient(to bottom, black, transparent);
  opacity:.6;
  z-index:0;
}
.hero-inner{
  position: relative; z-index:2;
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items:center;
}

.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing:.04em;
  margin-bottom: 20px;
  border:1px solid var(--border);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 999px;
}
.dot{
  width:7px; height:7px; border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.18);
  flex:none;
}

.hero-title{
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.hero-role{
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 20px;
}
.hero-sep{ color: var(--accent); margin: 0 4px; }

.hero-desc{
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 16.5px;
  margin-bottom: 34px;
}

.hero-cta{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 46px; }

.btn{
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s, background .2s, color .2s;
  display:inline-flex; align-items:center; gap:8px;
}
.btn-primary{
  background: var(--accent);
  color: #06231f;
}
html[data-theme="light"] .btn-primary{ color:#fff; }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(var(--accent-rgb),.55); }
.btn-ghost{
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-stats{ display:flex; gap: 34px; flex-wrap:wrap; }
.stat{ display:flex; flex-direction:column; gap:2px; }
.stat-num{ font-family: var(--font-mono); font-weight:700; font-size: 22px; color: var(--text); }
.stat-label{ font-size: 12.5px; color: var(--text-faint); }

/* ---- terminal ---- */
.hero-terminal-wrap{ position:relative; z-index:2; }

.terminal{
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow);
}
.terminal-bar{
  display:flex; align-items:center; gap:8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.tdot{ width:10px; height:10px; border-radius:50%; display:inline-block; }
.tdot-r{ background:#ff5f56; }
.tdot-y{ background:#ffbd2e; }
.tdot-g{ background:#27c93f; }
.terminal-title{
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.terminal-body{
  padding: 22px 20px 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.85;
  min-height: 230px;
}
.terminal-body .prompt{ color: var(--accent); margin-right:8px; }
.terminal-body .out{ color: var(--text-muted); display:block; padding-left: 20px; }
.terminal-body .key{ color: var(--accent-2); }
.terminal-cursor{
  display:inline-block; width:8px; height:16px; background: var(--accent);
  vertical-align:middle; margin-left:2px;
  animation: blink 1s steps(1) infinite;
}

.hero-avatar{
  position:absolute; right: -18px; bottom:-28px;
  width: 96px; height:96px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

/* ===================== SHARED SECTION ===================== */
.section{ padding: 100px 0; position:relative; z-index:2; }
.section-alt{ background: var(--bg-elevated); border-top:1px solid var(--border-soft); border-bottom:1px solid var(--border-soft); }

.section-eyebrow{
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: .05em;
  margin-bottom: 14px;
}
.section-title{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -.01em;
  margin-bottom: 44px;
  max-width: 22ch;
}

/* reveal-on-scroll */
.reveal{ opacity:0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in{ opacity:1; transform:none; }

/* ===================== ABOUT ===================== */
.about-grid{
  display:grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items:start;
}
.about-text{ color: var(--text-muted); font-size: 15.5px; margin-bottom: 18px; max-width: 62ch; }
.about-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
}
.about-card-row{
  display:flex; justify-content:space-between; gap:16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
}
.about-card-row:last-child{ border-bottom:none; }
.about-card-row span:first-child{ color: var(--text-faint); font-family: var(--font-mono); }
.about-card-row span:last-child{ color: var(--text); font-weight:500; text-align:right; }

/* ===================== EXPERIENCE / TIMELINE ===================== */
.timeline{ position:relative; }
.commit{ display:grid; grid-template-columns: 96px 1fr; gap: 28px; padding-bottom: 48px; }
.commit:last-child{ padding-bottom:0; }
.commit-marker{ display:flex; flex-direction:column; align-items:center; }
.commit-hash{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
  white-space:nowrap;
}
.commit-line{
  width:1px; flex:1; margin-top: 10px;
  background: linear-gradient(var(--border), transparent);
}
.commit:last-child .commit-line{ display:none; }

.commit-body{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
}
.commit-head{
  display:flex; justify-content:space-between; align-items:baseline; gap:16px; flex-wrap:wrap;
  margin-bottom: 4px;
}
.commit-head h3{ font-size: 19px; font-weight:700; }
.commit-date{ font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
.commit-org{ color: var(--accent); font-size: 13.5px; font-weight:600; margin-bottom: 16px; }
.commit-list{ list-style:none; display:flex; flex-direction:column; gap:11px; }
.commit-list li{
  position:relative; padding-left: 20px;
  color: var(--text-muted); font-size: 14.5px;
}
.commit-list li::before{
  content:'+'; position:absolute; left:0; top:0;
  color: var(--accent); font-family: var(--font-mono); font-weight:700;
}
.commit-list strong{ color: var(--text); font-weight:600; }
.commit-list code{
  background: var(--code-bg); border:1px solid var(--border-soft);
  padding: 1px 6px; border-radius:4px; font-size: 12.5px; color: var(--accent-2);
}

/* ===================== SKILLS ===================== */
.skills-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 36px 48px; }
.skill-group-title{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.chip-row{ display:flex; flex-wrap:wrap; gap:10px; }
.chip{
  display:inline-flex; align-items:center; gap:8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text);
  transition: border-color .2s, transform .2s;
}
.chip:hover{ border-color: var(--accent); transform: translateY(-1px); }
.chip img{ width:15px; height:15px; object-fit:contain; }

/* ===================== ACHIEVEMENTS ===================== */
.achievement-card{
  display:grid; grid-template-columns: 140px 1fr; gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  align-items:start;
  position:relative; overflow:hidden;
}
.achievement-card::before{
  content:''; position:absolute; inset:0;
  background: radial-gradient(600px 200px at 0% 0%, rgba(var(--accent-2-rgb),.10), transparent 60%);
  pointer-events:none;
}
.achievement-badge{
  width:140px; height:140px; border-radius: var(--radius-md);
  background: linear-gradient(155deg, rgba(var(--accent-2-rgb),.16), rgba(var(--accent-2-rgb),.04));
  border: 1px solid rgba(var(--accent-2-rgb),.35);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-weight:800; color: var(--accent-2);
}
.achievement-badge span:first-child{ font-size: 26px; letter-spacing:.02em; }
.achievement-badge span:last-child{ font-size: 14px; opacity:.85; }
.achievement-tag{ font-family: var(--font-mono); font-size:12.5px; color: var(--accent-2); margin-bottom:10px; }
.achievement-content h3{ font-size: 21px; margin-bottom: 12px; }
.achievement-content p:not(.achievement-tag){ color: var(--text-muted); font-size: 15px; max-width: 62ch; margin-bottom:18px; }
.achievement-tags{ display:flex; gap:8px; flex-wrap:wrap; }
.achievement-tags span{
  font-family: var(--font-mono); font-size:12px;
  border:1px solid var(--border); border-radius:6px; padding:4px 9px;
  color: var(--text-muted);
}

/* ===================== EDUCATION ===================== */
.edu-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.edu-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.edu-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:10px; }
.edu-head h3{ font-size:16px; font-weight:700; line-height:1.3; }
.edu-score{
  font-family: var(--font-mono); font-size:12.5px; color: var(--accent);
  border:1px solid var(--border); border-radius:999px; padding:3px 10px; white-space:nowrap;
}
.edu-org{ color: var(--text-muted); font-size:13.5px; margin-bottom:4px; }
.edu-date{ color: var(--text-faint); font-size:12.5px; font-family: var(--font-mono); }

/* ===================== CONTACT ===================== */
.section-contact{ padding-bottom: 120px; }
.contact-lead{ color: var(--text-muted); max-width: 58ch; margin-top:-24px; margin-bottom: 40px; font-size:15.5px; }

.contact-terminal{
  background: var(--code-bg);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow);
  max-width: 640px;
  margin-bottom: 38px;
}
.contact-body{ padding: 24px 26px 10px; }
.contact-body p{ margin-bottom: 14px; }
.contact-line{
  display:flex; gap:14px; padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  transition: padding-left .2s, color .2s;
}
.contact-line:hover{ padding-left: 8px; color: var(--accent); }
.contact-line:last-child{ border-bottom:none; }
.ck{ width: 84px; flex:none; color: var(--accent-2); }
.cv{ color: var(--text-muted); }
.contact-line:hover .cv{ color: var(--accent); }

.contact-cta{ margin-bottom:0; }

/* ===================== FOOTER ===================== */
.footer{ border-top:1px solid var(--border-soft); padding: 28px 0; }
.footer-inner{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px;
  font-family: var(--font-mono); font-size:12.5px; color: var(--text-faint);
}
.footer-status{ display:flex; align-items:center; gap:8px; }
.footer-status .dot{ width:6px; height:6px; box-shadow:none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-terminal-wrap{ order:-1; }
  .hero-avatar{ display:none; }
  .about-grid{ grid-template-columns: 1fr; }
  .skills-grid{ grid-template-columns: 1fr; }
  .edu-grid{ grid-template-columns: 1fr; }
  .achievement-card{ grid-template-columns: 1fr; }
  .achievement-badge{ width:100px; height:100px; }
}

@media (max-width: 760px){
  .nav-links{ display:none; }
  .nav-burger{ display:flex; }
  .nav.menu-open .nav-links{
    display:flex; position:absolute; top: var(--nav-h); left:0; right:0;
    flex-direction:column; background: var(--bg-elevated);
    border-bottom:1px solid var(--border); padding: 10px 24px 20px;
  }
  .commit{ grid-template-columns: 1fr; }
  .commit-marker{ flex-direction:row; margin-bottom:10px; }
  .commit-line{ display:none; }
}

@media (max-width: 480px){
  .section-inner{ padding: 0 20px; }
  .hero{ padding-top: calc(var(--nav-h) + 40px); }
  .hero-stats{ gap:22px; }
}
