/* ============================================================
   Ishaan Hattangady — Portfolio
   Terminal-inspired monochrome design system
   Mono display type · Inter body · white/silver accents only
   ============================================================ */

:root {
  /* Color — neutral monochrome */
  --bg: #0a0a0b;
  --bg-alt: #101012;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --border-hi: rgba(255, 255, 255, 0.24);
  --text: #ededf0;
  --text-muted: #9b9ba3;
  --dim: #5c5c64;
  --accent: #ffffff;
  --accent-2: #c7c7cf;
  --grad: linear-gradient(120deg, #ffffff 0%, #b3b3bc 100%);

  /* traffic-light accents (macOS window dots) */
  --red: #ff5f57;
  --yellow: #febc2e;
  --green: #28c840;

  /* Type */
  --font-display: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Spacing (8px base) */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 48px; --s8: 64px; --s10: 80px; --s14: 112px;

  --radius: 16px;
  --radius-sm: 10px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 var(--s2);
  letter-spacing: -0.02em;
}

p { margin: 0 0 var(--s2); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s2); top: -48px;
  background: var(--accent); color: #0a0a0b;
  padding: var(--s1) var(--s2); border-radius: var(--radius-sm);
  z-index: 100; transition: top 0.2s;
}
.skip-link:focus { top: var(--s2); }

/* ---------- Layout ---------- */
.container {
  width: min(1120px, 100% - var(--s5));
  margin-inline: auto;
}
.container-narrow { width: min(880px, 100% - var(--s5)); }

.section { padding: var(--s10) 0; }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--s2);
}

.section-title {
  font-size: clamp(24px, 3.8vw, 34px);
  font-weight: 700;
}

.section-sub {
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: var(--s5);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* typed command header above each section title */
.cmdline {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--dim);
  margin-bottom: var(--s3);
  min-height: 24px;
}
.cmdline .p { color: var(--green); font-weight: 600; }
.cmdline .c { color: var(--text-muted); }
.caret {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--green);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--grad);
  color: #0a0a0b;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(255, 255, 255, 0.2); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-strong); border-color: var(--border-hi); }

.btn-small { padding: 8px 16px; font-size: 13px; }

/* ---------- Ticker ---------- */
.ticker {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden;
  padding: 8px 0;
}
.ticker .track {
  display: inline-flex;
  gap: 48px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  animation: marq 30s linear infinite;
}
.ticker .track b { color: var(--green); font-weight: 600; }
.ticker:hover .track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  width: min(1120px, 100% - var(--s5));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: var(--s3);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}
.nav-brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--grad);
  color: #0a0a0b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.nav-link {
  font-family: var(--font-display);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link::before { content: "./"; color: var(--dim); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Hero: terminal window ---------- */
.hero { padding: var(--s6) 0 var(--s8); }

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* terminal window */
.t-term { padding: 0; }
.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.titlebar .dot:nth-child(1) { background: var(--red); }
.titlebar .dot:nth-child(2) { background: var(--yellow); }
.titlebar .dot:nth-child(3) { background: var(--green); }
.titlebar span {
  margin-left: 8px;
  font-family: var(--font-display);
  color: var(--text-muted);
  font-size: 12px;
}
.term {
  padding: 20px 24px;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.75;
  min-height: 175px; /* reserve space so typed output doesn't shift the layout */
}
.term .prompt { color: var(--green); font-weight: 600; }
.term .out { color: var(--text-muted); }
.term .hl { color: var(--text); font-weight: 600; }
.term .ok { color: var(--green); }
.typerole { color: var(--text-muted); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--s6);
  align-items: start;
}

.about-text p { max-width: 62ch; }

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
}

.about-card-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--s3);
}
.about-card-title::before { content: "# "; color: var(--dim); }

.about-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s2);
  font-size: 15px;
}
.about-facts li {
  display: grid;
  gap: 2px;
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}
.about-facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.about-facts span {
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ---------- Timeline ---------- */
.timeline-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
}

.timeline-heading { font-size: 18px; margin-bottom: var(--s3); }

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 var(--s4) var(--s3);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 7px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad);
}

.timeline-when {
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.timeline-title { font-size: 16px; margin-bottom: 4px; }
.timeline-desc { color: var(--text-muted); font-size: 15px; margin: 0; }

.timeline-points {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 15px;
}
.timeline-points li::marker { color: var(--accent-2); }
.timeline-points strong { color: var(--text); font-weight: 600; }

/* ---------- Certifications ---------- */
.cert-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
  margin-top: var(--s5);
  align-items: start;
}

.cert-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
  transition: border-color 0.25s;
}
.cert-group:hover { border-color: var(--border-hi); }

.cert-group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--s2);
}

.cert-logo {
  width: 40px; height: 40px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 5px;
}

.cert-group h3 {
  font-size: 17px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-count {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cert-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2);
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.cert-list li:first-child { border-top: 0; }
.cert-date {
  font-family: var(--font-display);
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- Projects (detail cards) ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s, background 0.25s;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hi);
  background: var(--surface-strong);
}
.project-card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--grad);
  transition: width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.project-card:hover::after { width: 100%; }

.project-card-future {
  border-style: dashed;
  background: transparent;
}

.project-icon {
  font-size: 24px;
  width: 50px; height: 50px;
  display: grid;
  place-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: var(--s3);
}

.project-name { font-size: 18px; }

.project-desc {
  color: var(--text-muted);
  font-size: 15px;
  flex-grow: 1;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  margin: 0 0 var(--s3);
  padding: 0;
}
.tag-list li {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 3px 11px;
  border-radius: 999px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
}

.project-note {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

/* ---------- Process ---------- */
.process-grid {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
  transition: border-color 0.25s, transform 0.25s;
}
.process-step:hover { border-color: var(--border-hi); transform: translateY(-3px); }

.process-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-2);
  letter-spacing: 0.1em;
}
.process-grid li:nth-child(1) .process-num { color: var(--red); }
.process-grid li:nth-child(2) .process-num { color: var(--yellow); }
.process-grid li:nth-child(3) .process-num { color: var(--green); }
.process-grid li:nth-child(1):hover { border-color: rgba(255, 95, 87, 0.4); }
.process-grid li:nth-child(2):hover { border-color: rgba(254, 188, 46, 0.4); }
.process-grid li:nth-child(3):hover { border-color: rgba(40, 200, 64, 0.4); }

.process-step h3 { font-size: 16px; margin: var(--s1) 0; }
.process-step p { color: var(--text-muted); font-size: 15px; margin: 0; }

/* ---------- Contact & footer ---------- */
.contact { padding-bottom: var(--s14); }
.contact-inner { text-align: center; }
.contact .hero-actions { justify-content: center; margin-bottom: 0; }
.contact .section-sub { margin-inline: auto; }
.contact .cmdline { text-align: center; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s8);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--s3) 0;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-display);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s2);
}
.footer-inner p { margin: 0; }
.footer-inner b { color: var(--green); font-weight: 600; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .project-card, .process-step { transition: none; }
  .caret { animation: none; }
  .ticker .track { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .about-grid,
  .timeline-cols,
  .project-grid,
  .process-grid,
  .cert-groups {
    grid-template-columns: 1fr;
  }
  .timeline-cols { gap: var(--s5); }
}

@media (max-width: 720px) {
  .section { padding: var(--s8) 0; }
  .hero { padding: var(--s4) 0 var(--s8); }

  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    background: rgba(10, 10, 11, 0.97);
    border-bottom: 1px solid var(--border);
    padding: var(--s3);
    gap: var(--s3);
  }
  .nav-menu.is-open { display: flex; }

  .term { font-size: 13.5px; min-height: 195px; }
}
