/* =============================================================
   Cynthia Patel — Software Engineer Portfolio
   Base styles: tokens, layout, sections, nav, hero, footer
   Light editorial theme · charcoal + off-white + teal
   ============================================================= */

:root {
  --bg: #f6f5f1;              /* off-white */
  --bg-warm: #f0efe9;
  --surface: #fffdf9;         /* card */
  --ink: #23282d;             /* charcoal */
  --ink-2: #454d55;
  --muted: #6d7681;
  --line: rgba(35, 40, 45, 0.10);
  --line-strong: rgba(35, 40, 45, 0.18);

  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --teal-soft: #e2f1ee;
  --teal-glow: rgba(20, 184, 166, 0.22);

  --charcoal: #23282d;        /* dark band sections */
  --charcoal-2: #2b3138;
  --on-charcoal: #eceae3;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 18px;
  --shadow: 0 18px 45px -22px rgba(35, 40, 45, 0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink-2);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.15; }
a { color: var(--teal); text-decoration: none; transition: color 0.3s var(--ease); }
a:hover { color: var(--teal-bright); }
img { max-width: 100%; }
::selection { background: var(--teal-soft); color: var(--ink); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Mono kicker used above every section headline */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--teal); }
.headline { font-size: clamp(30px, 4.4vw, 44px); font-weight: 600; margin-bottom: 14px; }
.headline em { font-style: italic; color: var(--teal); }

/* =============================================================
   SCROLL PROGRESS BAR
   ============================================================= */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright));
  z-index: 1001;
}

/* =============================================================
   NAV — sticky glass bar
   ============================================================= */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease),
              border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(246, 245, 241, 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -18px rgba(35, 40, 45, 0.25);
}
#nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink) !important;
  letter-spacing: -0.01em;
}
.brand span { color: var(--teal); font-style: italic; }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); transform-origin: left center; }
.nav-links a.active { color: var(--teal); }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--surface) !important;
  background: var(--ink);
  padding: 9px 18px;
  border-radius: 50px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.nav-cta:hover { background: var(--teal); transform: translateY(-2px); }

#nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 42px; height: 42px;
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
}
@media (max-width: 860px) {
  #nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute;
    top: 68px; left: 16px; right: 16px;
    flex-direction: column;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 8px; width: 100%; text-align: center; }
  .nav-cta { width: auto; }
}

/* =============================================================
   HERO
   ============================================================= */
#home {
  position: relative;
  padding: 170px 0 90px;
  overflow: hidden;
}
/* soft drifting teal blobs — calm, not particles */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}
.blob-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.28), transparent 65%);
  top: -80px; right: -60px;
  animation: drift1 16s ease-in-out infinite alternate;
}
.blob-2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(35, 40, 45, 0.10), transparent 65%);
  bottom: -120px; left: -80px;
  animation: drift2 20s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-60px, 50px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(70px, -40px) scale(1.08); } }

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.hero-hello {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
  display: inline-block;
  background: var(--teal-soft);
  padding: 7px 16px;
  border-radius: 50px;
}
.hero-name {
  font-size: clamp(46px, 7.2vw, 78px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
/* word-by-word rise-in */
.hero-name .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.hero-name .w > span {
  display: inline-block;
  transform: translateY(110%);
  animation: riseUp 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes riseUp { to { transform: translateY(0); } }

/* hand-drawn underline that draws itself */
.underline-wrap { position: relative; display: inline-block; }
.underline-wrap svg {
  position: absolute;
  left: 0; bottom: -8px;
  width: 100%; height: 16px;
  overflow: visible;
}
.underline-wrap svg path {
  fill: none;
  stroke: var(--teal-bright);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: draw 1s var(--ease) 0.9s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* role rotator — vertical slide */
.roles {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.6vw, 26px);
  color: var(--ink-2);
  height: 38px;
  overflow: hidden;
  margin: 14px 0 22px;
}
.roles ul { list-style: none; transition: transform 0.6s var(--ease); }
.roles li { height: 38px; display: flex; align-items: center; gap: 10px; }
.roles li::before { content: "—"; color: var(--teal); font-style: normal; }

.hero-copy { max-width: 54ch; margin-bottom: 30px; font-size: 16px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 28px;
  border-radius: 50px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background 0.3s var(--ease), color 0.3s var(--ease);
}
.btn-primary {
  background: var(--teal);
  color: #ffffff !important;
  box-shadow: 0 14px 30px -12px var(--teal-glow);
}
.btn-primary:hover {
  background: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -14px rgba(35, 40, 45, 0.4);
}
.btn-ghost {
  color: var(--ink) !important;
  border: 1.5px solid var(--line-strong);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal) !important; transform: translateY(-3px); }
.btn i { transition: transform 0.3s var(--ease); }
.btn:hover i { transform: translateX(4px); }

.hero-social { display: flex; gap: 10px; margin-top: 34px; }
.hero-social a {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  background: var(--surface);
  font-size: 16px;
  transition: all 0.3s var(--ease);
}
.hero-social a:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  transform: translateY(-4px) rotate(6deg);
  box-shadow: 0 12px 24px -10px var(--teal-glow);
}

/* Hero card — sunflower + animated teal border, gently floating */
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.hero-card {
  position: relative;
  border: 2px solid transparent;
  border-radius: 26px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--ring), var(--teal), var(--teal-bright), var(--teal-soft), var(--teal-bright), var(--teal)) border-box;
  box-shadow: var(--shadow);
  padding: 34px 30px 30px;
  text-align: center;
  animation: floaty 6s ease-in-out infinite, ringSpin 8s linear infinite;
  max-width: 340px;
  margin: 0 auto;
  overflow: visible;
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes ringSpin { to { --ring: 360deg; } }
.hero-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  border-radius: 18px;
  pointer-events: none;
}
/* =============================================================
   MARQUEE — tech ticker
   ============================================================= */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-warm);
  overflow: hidden;
  padding: 16px 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 44px;
  padding-right: 44px;
  animation: marquee 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 44px;
}
.marquee-track span::after { content: "✦"; color: var(--teal-bright); font-size: 11px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =============================================================
   SECTIONS (shared)
   ============================================================= */
section { padding: 96px 0; scroll-margin-top: 78px; }
footer { scroll-margin-top: 78px; }

/* Scroll reveal — two flavours */
.rv, .rv-blur {
  opacity: 0;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}
.rv { transform: translateY(34px); }
.rv-blur { transform: scale(0.97); filter: blur(6px); }
.rv.in, .rv-blur.in { opacity: 1; transform: none; filter: none; }

/* =============================================================
   ABOUT + COUNTERS
   ============================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { margin-bottom: 16px; font-size: 15.5px; }
.about-text strong { color: var(--ink); }
.about-text .sig {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--teal);
  margin-top: 8px;
}

.counters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.counter-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.counter-card:hover {
  transform: translateY(-6px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: var(--shadow);
}
.counter-card .num {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.counter-card .num i { color: var(--teal-bright); font-style: normal; }
.counter-card .lbl {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

/* =============================================================
   SKILLS
   ============================================================= */
#skills { background: var(--bg-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 30px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.skill-card .ic {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--teal-soft);
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.skill-card h4 { font-size: 18px; margin-bottom: 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 8px;
  transition: all 0.25s var(--ease);
  cursor: default;
}
.tag:hover { background: var(--teal); border-color: var(--teal); color: #fff; transform: translateY(-2px); }

/* =============================================================
   EXPERIENCE — vertical timeline with growing line
   ============================================================= */
.timeline { position: relative; margin-top: 44px; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
}
.timeline .grow-line {
  position: absolute;
  left: 8px; top: 6px;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--teal), var(--teal-bright));
  border-radius: 2px;
  transition: height 0.25s linear;
}
.t-item { position: relative; padding-bottom: 44px; }
.t-item:last-child { padding-bottom: 0; }
.t-item::before {
  content: "";
  position: absolute;
  left: -32px; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--teal);
  transform: scale(0);
  transition: transform 0.5s var(--ease) 0.15s;
}
.t-item.in::before { transform: scale(1); }
.t-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.t-card:hover {
  transform: translateX(8px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: var(--shadow);
}
.t-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.t-card h4 { font-size: 20px; }
.t-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 5px 13px;
  border-radius: 50px;
  white-space: nowrap;
}
.t-client { font-style: italic; color: var(--muted); font-size: 14.5px; margin-bottom: 4px; }
.t-stack {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  display: block;
}
.t-card ul { padding-left: 20px; }
.t-card li { margin-bottom: 7px; font-size: 14.5px; }
.t-card li::marker { color: var(--teal-bright); }

/* =============================================================
   RESUME — half preview + fade + download CTA
   ============================================================= */
#resume .preview-wrap {
  position: relative;
  height: 460px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-top: 36px;
}
.preview-frame {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(720px, 94%);
  height: auto;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  margin-top: 26px;
  pointer-events: none;
  box-shadow: 0 12px 40px -18px rgba(35, 40, 45, 0.35);
}
.preview-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 32%, var(--surface) 88%);
}
.preview-cta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 30px 20px 36px;
  text-align: center;
}
.preview-cta p {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--muted);
}

/* =============================================================
   EDUCATION + AWARDS
   ============================================================= */
#education { background: var(--bg-warm); border-top: 1px solid var(--line); }
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 36px;
}
@media (max-width: 860px) { .edu-grid { grid-template-columns: 1fr; } }
.edu-card, .award-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 16px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.edu-card:hover, .award-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.edu-card h4 { font-size: 18px; margin-bottom: 6px; }
.edu-card .t-date { display: inline-block; margin-bottom: 8px; }
.edu-card p { font-size: 14.5px; color: var(--muted); }
.edu-card p b { color: var(--ink-2); }
.subhead { font-family: var(--serif); font-size: 24px; margin-bottom: 18px; }

.award-card { display: flex; gap: 16px; align-items: flex-start; }
.award-card .ic {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}
.award-card h5 { font-family: var(--sans); font-weight: 600; font-size: 15px; color: var(--ink); margin-bottom: 3px; }
.award-card p { font-size: 13.5px; color: var(--muted); }

/* =============================================================
   FOOTER — charcoal band
   ============================================================= */
footer {
  background: var(--charcoal);
  color: var(--on-charcoal);
  padding: 80px 0 30px;
  position: relative;
  overflow: hidden;
}
footer::before {
  content: "";
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.14), transparent 65%);
  top: -200px; right: -140px;
  filter: blur(30px);
}
footer h2 {
  color: #fff;
  font-size: clamp(30px, 4.5vw, 46px);
  margin-bottom: 14px;
}
footer h2 em { color: var(--teal-bright); font-style: italic; }
footer .btn-primary { background: var(--teal-bright); color: var(--charcoal) !important; }
footer .btn-primary:hover { background: #fff; }
.foot-social { display: flex; gap: 10px; margin-top: 8px; }
.foot-social a {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(236, 234, 227, 0.2);
  color: var(--on-charcoal);
  font-size: 16px;
  transition: all 0.3s var(--ease);
}
.foot-social a:hover { background: var(--teal-bright); color: var(--charcoal); border-color: transparent; transform: translateY(-4px); }
.foot-bottom {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid rgba(236, 234, 227, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(236, 234, 227, 0.55);
}
.foot-bottom .mono { font-family: var(--mono); }

/* =============================================================
   BACK TO TOP
   ============================================================= */
#to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.3s var(--ease);
  z-index: 999;
  box-shadow: var(--shadow);
}
#to-top.show { opacity: 1; transform: none; pointer-events: auto; }
#to-top:hover { background: var(--teal); }

/* =============================================================
   REDUCED MOTION
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .rv, .rv-blur, .hero-name .w > span { opacity: 1 !important; transform: none !important; filter: none !important; }
  .underline-wrap svg path { stroke-dashoffset: 0; }
  .marquee-track { animation: none; }
}
