/* ============================================================
   Ishaan Sharma — personal site
   Dark, sophisticated, single-page. Mobile-first.
   ============================================================ */

:root {
  --bg: #0d0f12;
  --bg-soft: #111418;
  --surface: #161a20;
  --surface-2: #1c2129;
  --text: #eceff4;
  --muted: #a3adbd;
  --faint: #6b7484;
  --accent: #e0a458;
  --accent-soft: rgba(224, 164, 88, 0.12);
  --line: rgba(255, 255, 255, 0.09);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); letter-spacing: -0.01em; }
h2.section-title { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1.25em; position: relative; padding-bottom: 0.4em; }
h2.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
h3 { font-size: 1.35rem; }

.container { width: min(1060px, 92%); margin: 0 auto; }
.container.narrow { width: min(680px, 92%); }

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #14100a;
  padding: 0.6rem 1rem;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ============ Header / nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1180px, 94%);
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.nav-brand:hover { text-decoration: none; color: var(--accent); }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  display: inline-block;
}
.nav-links a:hover { color: var(--text); text-decoration: none; background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  margin-left: 0.4rem;
}
.nav-cta:hover { background: var(--accent-soft) !important; color: var(--accent) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 1px;
}

/* ============ Hero ============ */
.hero {
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(224, 164, 88, 0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(120, 150, 220, 0.07), transparent 60%),
    var(--bg);
}
.hero-inner {
  width: min(1060px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-photo img {
  width: min(300px, 70vw);
  aspect-ratio: 3 / 3.6;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.65);
  margin: 0 auto;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.role { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.1rem; font-weight: 500; }
.lede { font-size: 1.13rem; color: var(--muted); max-width: 44rem; margin: 0 0 1.8rem; }
.lede-sub { margin-top: -1.1rem; }
.lede strong { color: var(--text); }

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.socials a {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.socials a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.socials svg { width: 22px; height: 22px; fill: var(--text); }

/* ============ Sections ============ */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ============ Timeline ============ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 27px;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  padding: 0 0 2rem 0;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-logo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.timeline-head h3 { margin: 0 0 0.2rem; font-size: 1.25rem; }
.timeline-role { margin: 0; color: var(--muted); font-size: 0.98rem; }
.timeline-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--faint);
  text-align: right;
  white-space: nowrap;
  line-height: 1.5;
}
.timeline-card ul, .card ul { margin: 0.5rem 0 0; padding-left: 1.25rem; color: var(--muted); }
.timeline-card li, .card li { margin-bottom: 0.35rem; }
.timeline-card li::marker, .card li::marker { color: var(--accent); }
.timeline-card strong, .card strong { color: var(--text); font-weight: 600; }

/* ============ Project cards ============ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 164, 88, 0.45);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
}
.card h3 { margin-bottom: 0.15rem; }
.card-dates { margin: 0 0 0.6rem; font-size: 0.88rem; color: var(--faint); }
.card ul { font-size: 0.98rem; }

/* ============ Skills ============ */
.skills-wrap { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.skills-wrap h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 1rem; }
.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tag-list li {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.18s ease;
}
.tag-list li:hover { border-color: var(--accent); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; color: var(--muted); }
.check-list li { position: relative; padding-left: 1.7rem; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ============ Education ============ */
.edu-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.edu-block:last-child { margin-bottom: 0; }
.edu-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.edu-head h3 { margin: 0 0 0.2rem; }
.edu-degree { margin: 0; color: var(--muted); font-style: italic; }
.edu-courses { margin-top: 1rem; }
.edu-courses summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0;
}
.edu-courses ul {
  margin: 0.8rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  columns: 1;
  font-size: 0.96rem;
}
.edu-courses li { margin-bottom: 0.3rem; break-inside: avoid; }
.edu-courses li::marker { color: var(--accent); }

/* ============ Contact ============ */
.contact { text-align: center; }
.contact .section-title::after { left: 50%; transform: translateX(-50%); }
.contact p { color: var(--muted); font-size: 1.1rem; }
.contact-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #171208;
  font-weight: 600;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(224, 164, 88, 0.5); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--line); padding: 1.8rem 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.site-footer p { margin: 0; font-size: 0.9rem; color: var(--faint); }
.footer-note { color: var(--faint); }

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

/* ============ Responsive ============ */
@media (min-width: 720px) {
  .hero-inner { grid-template-columns: 320px 1fr; gap: 3.5rem; }
  .hero-photo img { margin: 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-courses ul { columns: 2; }
  .skills-wrap { grid-template-columns: 1.2fr 1fr; }
}

@media (min-width: 1080px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 4%;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.8rem 0.6rem; }
  .nav-cta { margin: 0.4rem 0 0.2rem; text-align: center; }
  .timeline-meta { text-align: left; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ Dual Audible titles ============ */
.timeline-role .role-dates {
  color: var(--faint);
  font-size: 0.85em;
  font-weight: 500;
  margin-left: 0.5rem;
  white-space: nowrap;
}
.timeline-role + .timeline-role { margin-top: 0.2rem; }

/* ============ AWS blurb ============ */
.aws-blurb { color: var(--muted); font-size: 1.02rem; max-width: 44rem; }

/* ============ Compact project list ============ */
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.project-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  display: grid;
  gap: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.project-row:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 164, 88, 0.45);
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.6);
}
.project-row h3 {
  margin: 0;
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.project-dates {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--faint);
  font-weight: 500;
  white-space: nowrap;
}
.project-main p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.project-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.project-tags li {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(224, 164, 88, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

/* ============ AWS services marquee ============ */
.marquee {
  overflow: hidden;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 2.5rem;
  padding: 1rem 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  color: var(--faint);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.marquee-track span:hover { color: var(--accent); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Fun bits: shimmer, typed ============ */
#hero-heading .accent {
  background: linear-gradient(110deg, var(--accent) 20%, #f7d9a8 40%, var(--accent) 60%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.typed { color: var(--accent); font-weight: 600; }
.typed-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: -0.15em;
  animation: blink 1.05s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  #hero-heading .accent { animation: none; }
  .typed-caret { animation: none; }
}
