/* ForestSageSarah */
:root {
  --nav-h: 48px;
  --font: 'Marck Script', cursive;
  --font-ui: system-ui, sans-serif;
  --text: #f0f0f0;
  --text-dim: #aaa;
  --text-muted: #666;
  --link: #7ecfee;
  --link-hover: #b8eafc;
  --border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(0, 0, 0, 0.78);
}

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

html {
  background: #000;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.7;
  opacity: 1;
  transition: 1s opacity;
}
body.fade-out { opacity: 0; transition: none; }

/* Bokeh canvas */
.canvas {
  position: fixed !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

/* ── Nav ── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  z-index: 100;
  will-change: transform;
}

#site-nav {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem;
  gap: 1.25rem;
}

.nav-brand {
  font-family: var(--font);
  font-size: 1.1rem;
  text-decoration: none;
  background: linear-gradient(to right, orange, yellow, green, cyan, blue, violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  flex: 1;
}
.nav-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.03em;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.07); }
.nav-links a.active { color: var(--link); }

.nav-social {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  position: relative;
}

.email-turnstile-popup {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(6, 6, 6, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.85rem;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
  min-width: 230px;
  max-width: calc(100vw - 2rem);
}
.email-turnstile-popup--up {
  top: auto;
  bottom: calc(100% + 10px);
  right: 50%;
  transform: translateX(50%);
}
.email-turnstile-popup--up::before {
  top: auto;
  bottom: -5px;
  right: 50%;
  transform: translateX(50%) rotate(225deg);
}
.email-turnstile-popup::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 18px;
  width: 9px;
  height: 9px;
  background: rgba(6, 6, 6, 0.94);
  border-left: 1px solid rgba(255,255,255,0.1);
  border-top: 1px solid rgba(255,255,255,0.1);
  transform: rotate(45deg);
}
.email-turnstile-popup p {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin: 0 0 0.6rem;
}
.nav-social-link {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-social-link:hover { color: var(--link); border-color: rgba(126,207,238,0.4); }

.nav-email {
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s;
  user-select: none;
}
.nav-email:hover { color: #f4d58d; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: rgba(255,255,255,0.5); }

/* ── Wrapper & card ── */
#wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: calc(var(--nav-h) + 2rem) 1rem 3rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.content {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  width: 100%;
  max-width: 620px;
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.11);
  box-shadow: 0 8px 48px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--font);
  text-align: center;
  background: linear-gradient(to right, orange, yellow, green, cyan, blue, violet);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
h2 { font-size: 1.4rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.3rem; text-align: left; }

hr {
  display: block;
  border: none;
  height: 1px;
  background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 350, from(rgba(255,255,255,0.3)), to(transparent));
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.25) 0%, transparent 70%);
  margin: 1.25rem 0;
}

p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.88);
  text-align: center;
  margin-bottom: 0.5rem;
}

/* ── Avatar ── */
.avatar {
  display: block;
  margin: 0 auto 1rem;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 24px rgba(0,0,0,0.6);
}

/* ── Skills ── */
.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}
.skill {
  font-size: 0.76rem;
  padding: 0.22rem 0.65rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.04);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  cursor: default;
}
.skill:hover {
  color: var(--link-hover);
  border-color: rgba(126,207,238,0.45);
  background: rgba(126,207,238,0.06);
}

/* ── Project cards ── */
@keyframes rainbow-border {
  0%   { background: hsl(0,   90%, 65%); }
  100% { background: hsl(360, 90%, 65%); }
}

.project-card {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  text-align: left;
  transition: background 0.2s;
}
.project-card:hover { background: rgba(255,255,255,0.07); }

.project-card::before,
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  animation: rainbow-border 4s linear infinite;
  pointer-events: none;
}
.project-card::before { left: 0; }
.project-card::after  { right: 0; animation-delay: -2s; }

.project-card p {
  text-align: left;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.82);
  margin: 0.3rem 0 0.65rem;
}

/* Tech stack tags */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
}
.tech-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(126,207,238,0.22);
  border-radius: 3px;
  color: rgba(126,207,238,0.7);
  background: rgba(126,207,238,0.05);
  letter-spacing: 0.02em;
}

/* Project links */
.project-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.project-links a {
  font-size: 0.8rem;
  color: var(--link);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, text-shadow 0.15s;
}
.project-links a:hover {
  color: var(--link-hover);
  border-bottom-color: rgba(184,234,252,0.4);
  text-shadow: 0 0 8px rgba(126,207,238,0.5);
}

/* ── Experience ── */
.job-entry { margin-bottom: 1.4rem; }
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.job-company {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.job-period {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.job-title {
  font-size: 0.8rem;
  color: rgba(126,207,238,0.65);
  font-style: italic;
  margin-bottom: 0.4rem;
}
.job-bullets { list-style: none; padding: 0; }
.job-bullets li {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.85);
  padding-left: 1.1rem;
  text-indent: 0;
  position: relative;
  margin-bottom: 0.35rem;
  line-height: 1.6;
}
.job-bullets li::before { content: '·'; position: absolute; left: 0.25rem; top: 0; color: var(--text-muted); }

/* ── Contact form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label {
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.form-input,
.form-textarea {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text);
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.form-input:focus,
.form-textarea:focus {
  border-color: rgba(126,207,238,0.45);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(126,207,238,0.08);
}
.form-textarea { resize: vertical; min-height: 90px; }

#turnstile-container { margin-top: 0.25rem; }

.form-status { font-size: 0.82rem; min-height: 1.2rem; }
.form-status-success { color: #7ec88a; }
.form-status-error   { color: #e06c75; }

.form-submit {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.form-submit:hover:not(:disabled) {
  background: rgba(126,207,238,0.1);
  border-color: rgba(126,207,238,0.4);
  box-shadow: 0 0 10px rgba(126,207,238,0.12);
}
.form-submit:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Social icon bar ── */
#bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.5rem auto 0;
  position: relative;
}
.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.04);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.social-icon-link svg { width: 20px; height: 20px; display: block; }
.social-icon-btn { cursor: pointer; font: inherit; }
.social-icon-link:hover {
  color: var(--link-hover);
  border-color: rgba(126,207,238,0.4);
  background: rgba(126,207,238,0.07);
  box-shadow: 0 0 10px rgba(126,207,238,0.15);
}

/* ── Copyright ── */
.copyright {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  text-align: center;
  margin-top: 0.75rem;
  letter-spacing: 0.03em;
}

/* ── Email obfuscation ── */
.obf-email { cursor: pointer; }
.obf-email:hover { color: #f4d58d; }

/* ── Animations ── */
@keyframes float-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.anim { animation: float-in 0.45s ease-out both; }

/* ── Tablet: collapse nav early so 5 links + social don't squish ── */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-social { display: none; }
  #site-nav { position: relative; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    background: rgba(0,0,0,0.95);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 0.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  #site-nav.nav-open .nav-links { display: flex; }
  .nav-links a {
    padding: 0 1rem;
    min-height: 48px;
  }
}

/* ── Mobile ── */
@media (max-width: 480px) {
  #wrapper { padding: calc(var(--nav-h) + 1rem) 0.75rem 2rem; }
  .content { padding: 1.25rem 1rem; border-radius: 14px; }
  .form-submit { width: 100%; align-self: stretch; text-align: center; }
  .job-header { flex-direction: column; gap: 0.15rem; }
  .job-period { white-space: normal; }
  h1 { font-size: 1.6rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .anim { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
  body { transition: none; }
  .project-card::before,
  .project-card::after { animation: none; background: rgba(126,207,238,0.5); }
}

/* ── Print ── */
@media print {
  #site-header, .canvas { display: none !important; }
  #wrapper { padding-top: 0; }
  body { background: white; color: #111; }
}
