/* ============================================================
   Soham Sood — Portfolio
   Dark, minimal, technical aesthetic. One accent color.
   ============================================================ */

/* ----------------------- Design tokens ----------------------- */
:root {
  /* Neutral ramp (dark) */
  --bg: #0a0c10;
  --bg-soft: #11141b;
  --surface: #141821;
  --surface-2: #1a1f2b;
  --border: #232a37;
  --border-soft: #1b212c;

  /* Text */
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #565f6d;

  /* Single restrained accent — cyan */
  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-glow: rgba(45, 212, 191, 0.25);

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

  /* Spacing (8px base) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-10: 5rem;

  /* Layout */
  --maxw: 960px;
  --radius: 10px;
  --radius-sm: 6px;
}

/* ----------------------- Reset ----------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* ----------------------- Buttons ----------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--accent);
  color: #06120f;
  border-color: var(--accent);
  font-weight: 600;
}

.btn--primary:hover {
  background: #34e0c9;
  border-color: #34e0c9;
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ----------------------- Navbar ----------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav--scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 12, 16, 0.85);
}

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav__bracket {
  color: var(--accent);
}

.nav__slash {
  color: var(--text-dim);
}

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----------------------- Hero ----------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero::before {
  /* subtle grid backdrop — engineering aesthetic */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, #000 30%, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}

.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  position: relative;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.hero__name {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.hero__role {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero__tagline {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.hero__tagline::before {
  content: "$ ";
  color: var(--accent);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ----------------------- Sections ----------------------- */
.section {
  padding: var(--space-10) 0;
  border-top: 1px solid var(--border-soft);
}

.section__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: var(--space-5);
}

.section__index {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.section__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ----------------------- About ----------------------- */
.about {
  max-width: 640px;
}

.about p {
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  font-size: 1.02rem;
}

.about p:last-child {
  margin-bottom: 0;
}

/* ----------------------- Projects ----------------------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-2);
  flex-grow: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-2);
}

.tags li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.card__actions {
  display: flex;
  gap: 0.5rem;
}

/* ----------------------- Problem solving ----------------------- */
.ps__lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: var(--space-5);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-align: center;
  transition: border-color 0.25s ease;
}

.stat:hover {
  border-color: var(--accent);
}

.stat__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-2);
}

.highlights li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  transition: border-color 0.25s ease;
}

.highlights li:hover {
  border-color: var(--accent);
}

.highlights__badge {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
}

.highlights h3 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.highlights p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ----------------------- Skills ----------------------- */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: border-color 0.25s ease;
}

.skill-group:hover {
  border-color: var(--accent);
}

.skill-group__title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.chips li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ----------------------- Education ----------------------- */
.edu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  transition: border-color 0.25s ease;
}

.edu:hover {
  border-color: var(--accent);
}

.edu__main h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.edu__main p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.edu__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.edu__gpa {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  font-size: 1.05rem;
}

.edu__years {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ----------------------- Contact ----------------------- */
.contact__lead {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  max-width: 500px;
}

.contact__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-2);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  transition: border-color 0.25s ease, transform 0.2s ease;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-card__label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.contact-card__value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

/* ----------------------- Footer ----------------------- */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: var(--space-4) 1.5rem;
}

.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__sub {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 0.3rem;
  font-family: var(--font-mono);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------- Responsive ----------------------- */
@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav__links.is-open {
    transform: translateY(0);
  }

  .nav__links a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav__links a:last-child {
    border-bottom: none;
  }

  .nav__toggle {
    display: flex;
  }

  .edu__meta {
    align-items: flex-start;
  }

  .hero__actions .btn {
    flex-grow: 1;
  }
}

@media (max-width: 420px) {
  .hero__actions {
    flex-direction: column;
  }
  .hero__actions .btn {
    width: 100%;
  }
}

/* ----------------------- Reduced motion ----------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
