/* ============================================================
   ethanshifrin.com — styles
   Plain CSS, no frameworks. Dark theme with teal→blue gradients.
   Sections mirror index.html order.
   ============================================================ */

:root {
  --bg: #0b1120;
  --surface: #131c2e;
  --surface-2: #182338;
  --ink: #e8edf6;
  --ink-soft: #a3b0c2;
  --accent: #2dd4bf;
  --accent-2: #60a5fa;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --grad: linear-gradient(135deg, #2dd4bf 0%, #60a5fa 100%);
  --line: rgba(148, 163, 184, 0.16);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

/* elements with the hidden attribute stay hidden even when CSS
   gives them a display value (e.g. the photo fallback) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  /* soft color glows in the corners of the page */
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, rgba(96, 165, 250, 0.14), transparent 60%),
    radial-gradient(50rem 35rem at -10% 30%, rgba(45, 212, 191, 0.1), transparent 60%),
    radial-gradient(55rem 40rem at 50% 110%, rgba(96, 165, 250, 0.08), transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--accent); }
a:hover { color: var(--accent-2); }

/* gradient text for the logo accent */
.accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid rgba(45, 212, 191, 0.5);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
}

.nav-cta:hover { background: var(--accent-soft); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.kicker {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  /* gradient name */
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.hero-tagline strong { color: var(--ink); }

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

.btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--grad);
  color: #0b1120;
  border: 0;
}

.btn-primary:hover { filter: brightness(1.12); color: #0b1120; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

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

.hero-photo { text-align: center; }

/* gradient ring around the photo */
.photo-frame {
  position: relative;
  width: min(260px, 70vw);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 3px;
  border-radius: var(--radius);
  background: var(--grad);
  box-shadow: var(--shadow);
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 2px solid var(--accent-2);
  opacity: 0.3;
  pointer-events: none;
  transform: translate(10px, 10px);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius) - 3px);
}

.photo-fallback {
  position: absolute;
  inset: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-2);
  border-radius: calc(var(--radius) - 3px);
}

.photo-caption {
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 1.4rem;
}

/* ---------- stats band ---------- */

.stats-band {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  padding: 2.25rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

/* ---------- timeline ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.75rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, #2dd4bf, #60a5fa);
  opacity: 0.5;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
}

.timeline-year {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.timeline-item h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.15rem;
}

.timeline-item p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 44rem;
}

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* gentle stagger for card grids and stats */
.cards .reveal:nth-child(2), .stats-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.cards .reveal:nth-child(3), .stats-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.stats-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- sections ---------- */

.section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin: 0 0 1.75rem;
}

.section-label {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.1rem;
  font-weight: 700;
  margin-right: 0.4rem;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.about-grid p { margin: 0; color: var(--ink-soft); }

.about-lead {
  font-size: 1.12rem;
  color: var(--ink) !important;
}

/* ---------- tech help desk highlight (macOS-style window) ---------- */

.highlight-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 1rem;
}

.window-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-bar .dot:first-child { background: #ff5f57; }
.window-bar .dot:nth-child(2) { background: #febc2e; }
.window-bar .dot:nth-child(3) { background: #28c840; }

.window-title {
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin-left: 0.6rem;
}

.highlight-body { padding: 1.75rem 2rem 2rem; }

.highlight-body p { color: var(--ink-soft); }

.highlight-lede {
  font-size: 1.15rem;
  color: var(--ink) !important;
  margin-top: 0;
}

.highlight-points {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.highlight-points li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
}

.highlight-points li::before {
  content: "→";
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: absolute;
  left: 0;
}

/* ---------- experience / education cards ---------- */

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

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-head { margin-bottom: 0.9rem; }

.card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
}

.card-org {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.card-dates {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0.3rem 0 0;
}

.card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.card li { margin-bottom: 0.45rem; }

/* ---------- skills tags ---------- */

.skills-label {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 1rem 0 0.5rem;
}

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

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  white-space: nowrap;
}

.card h3 .tag { vertical-align: middle; margin-left: 0.4rem; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-blurb p { color: var(--ink-soft); margin-top: 0; }

#contact-form {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

#contact-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 1rem 0 0.35rem;
}

#contact-form label:first-of-type { margin-top: 0; }

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: rgba(11, 17, 32, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  resize: vertical;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

#contact-form .btn { margin-top: 1.25rem; }

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.form-status {
  font-size: 0.88rem;
  margin: 0.9rem 0 0;
  min-height: 1.3em;
}

.form-status.ok { color: var(--accent); }
.form-status.err { color: #fca5a5; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-inner p { margin: 0; }

.footer-note { font-size: 0.85rem; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
    text-align: center;
  }

  .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
    box-shadow: var(--shadow);
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.7rem 0;
    font-size: 1.05rem;
  }

  .nav-cta {
    border: 0;
    padding: 0.7rem 0;
    border-radius: 0;
  }

  .nav-cta:hover { background: none; }
}
