/* ============================================================
   Portfolio styles — edit colors in :root below
   ============================================================ */
:root {
  --bg: #0d1117;
  --bg-soft: #161b22;
  --bg-card: #161b22;
  --border: #232a33;
  --text: #e6edf3;
  --text-dim: #9aa7b4;
  --accent: #6ea8fe;
  --accent-2: #8b7cf6;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --maxw: 980px;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-card: #ffffff;
  --border: #e3e8ee;
  --text: #1a2027;
  --text-dim: #5b6672;
  --accent: #2f6fed;
  --accent-2: #6d4cf0;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__brand { font-weight: 700; color: var(--text); font-family: var(--mono); }
.nav__links { display: flex; gap: 1.25rem; margin-left: auto; flex-wrap: wrap; }
.nav__links a { color: var(--text-dim); font-size: .92rem; }
.nav__links a:hover { color: var(--text); text-decoration: none; }
.nav__theme,
.nav__toggle {
  background: none; border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: 8px; cursor: pointer; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.nav__toggle { display: none; font-size: 1.2rem; }

@media (max-width: 620px) {
  .nav { flex-wrap: wrap; gap: .6rem; }
  .nav__toggle { display: inline-flex; margin-left: auto; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin-left: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: .2rem clamp(1rem, 4vw, 2.5rem) .6rem;
    box-shadow: 0 12px 24px -16px rgba(0,0,0,.5);
    display: none;
  }
  .nav--open .nav__links { display: flex; }
  .nav__links a {
    padding: .85rem .2rem; font-size: 1.02rem; width: 100%;
    border-top: 1px solid var(--border);
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: auto; display: flex; align-items: flex-end; gap: 3rem;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 0;
  max-width: var(--maxw); margin: 0 auto;
}
.hero__text { flex: 1 1 380px; }
.hero__eyebrow {
  font-family: var(--mono); color: var(--accent); font-size: .85rem;
  letter-spacing: .04em; margin-bottom: 1rem;
}
.hero__title { font-size: 2.65rem; line-height: 1.05; letter-spacing: 0; white-space: nowrap; }
.hero__contact {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  margin-top: .9rem;
}
.hero__contact-btn {
  padding: .55rem .9rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: .86rem;
}
.hero__tagline { font-size: clamp(1.05rem, 2.5vw, 1.35rem); color: var(--text-dim); margin: 1.25rem 0 2rem; }
.hero__socials { display: flex; gap: .75rem; flex-wrap: wrap; font-family: var(--mono); font-size: .9rem; }
.social {
  display: inline-flex; align-items: center;
  padding: .4rem .85rem; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text);
  background: var(--bg-soft);
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.social:hover {
  color: var(--accent); border-color: var(--accent);
  text-decoration: none; transform: translateY(-2px);
}

/* Headshot */
.hero__photo { flex: 0 0 auto; position: relative; }
.hero__photo img,
.hero__photo-fallback {
  width: clamp(160px, 26vw, 240px); height: clamp(160px, 26vw, 240px);
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border);
}
.hero__photo-fallback {
  display: none; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 3rem; font-weight: 600; color: var(--text-dim);
  background: linear-gradient(145deg, var(--bg-soft), var(--bg-card));
}
@media (max-width: 700px) {
  .hero {
    flex-direction: column-reverse; align-items: center; text-align: center;
    gap: 1.5rem; min-height: auto; padding-top: 3rem;
  }
  .hero__text { flex: 0 1 auto; width: 100%; }
  .hero__title { font-size: 2rem; white-space: normal; }
  .hero__contact { justify-content: center; }
  .hero__contact-btn { max-width: 100%; overflow-wrap: anywhere; }
  .hero__socials { justify-content: center; }
  .box--tagline, .box--links { display: block; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 1.7rem; }
}

/* Optional intro video */
.video { margin-top: 1.5rem; }
.video video { width: 100%; max-width: 560px; border-radius: var(--radius); border: 1px solid var(--border); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .7rem 1.3rem; border-radius: 10px;
  font-weight: 600; font-size: .95rem; transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #0a0e14; }
.btn--ghost { border: 1px solid var(--border); color: var(--text); }
.btn--lg { padding: .9rem 1.8rem; font-size: 1.05rem; font-family: var(--mono); }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 2.75rem clamp(1rem, 4vw, 2.5rem); }
.section--inquiry { padding-top: 0; padding-bottom: 1.5rem; }
.section__title {
  font-size: 1.6rem; margin-bottom: 1.75rem; display: flex; align-items: baseline; gap: .6rem;
}
.section__title span { font-family: var(--mono); color: var(--accent); font-size: 1rem; }
.section__sub { color: var(--text-dim); margin-bottom: 1.75rem; }
/* ---------- Boxed content ---------- */
.box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.box__label {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .7rem;
}
/* Each box gets a slightly different tint */
.box--tagline {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
.box--links {
  display: inline-block;
  background: color-mix(in srgb, var(--accent-2) 7%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent-2) 28%, var(--border));
}
.box--links .box__label { color: var(--accent-2); }
.box--about {
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
}
.box--inquiry {
  max-width: 720px;
  background: color-mix(in srgb, var(--accent-2) 8%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent-2) 28%, var(--border));
  border-left: 3px solid var(--accent-2);
}

.about { font-size: 1.1rem; color: var(--text-dim); max-width: 720px; }
.inquiry__text { font-size: 1.1rem; line-height: 1.6; color: var(--text-dim); }

.tag {
  font-family: var(--mono); font-size: .78rem; padding: .25rem .6rem;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim);
}

/* ---------- Experience timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 1.5rem; }
.tl-item {
  display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem;
  border-left: 2px solid var(--border); padding-left: 1.5rem; position: relative;
}
.tl-item::before {
  content: ""; position: absolute; left: -7px; top: .4rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.tl-period { font-family: var(--mono); font-size: .85rem; color: var(--text-dim); padding-top: .15rem; }
.tl-role { font-size: 1.15rem; font-weight: 600; }
.tl-org { color: var(--accent); font-size: .95rem; margin-bottom: .5rem; }
.tl-bullets { list-style: none; display: flex; flex-direction: column; gap: .35rem; }
.tl-bullets li { color: var(--text-dim); font-size: .95rem; padding-left: 1.1rem; position: relative; }
.tl-bullets li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }
@media (max-width: 620px) { .tl-item { grid-template-columns: 1fr; gap: .5rem; } }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.filter {
  font-family: var(--mono); font-size: .82rem; padding: .35rem .8rem; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 20px; color: var(--text-dim);
  transition: all .15s;
}
.filter:hover { color: var(--text); }
.filter.active { background: var(--accent); color: #0a0e14; border-color: var(--accent); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 30px -12px rgba(0,0,0,.4); }
.card__media {
  margin: -1.5rem -1.5rem 0;                       /* bleed to the card edges (cancel padding) */
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 2px; background: #000;
}
.card__media img, .card__media video {
  display: block; width: 100%; height: 190px; object-fit: cover; background: #000;
}
.card__head { display: flex; justify-content: space-between; align-items: start; gap: .5rem; }
.card__title { font-size: 1.15rem; font-weight: 600; }
.card__year { font-family: var(--mono); font-size: .78rem; color: var(--text-dim); }
.card__desc { color: var(--text-dim); font-size: .95rem; flex-grow: 1; }
.card__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.card__links { display: flex; gap: 1rem; font-family: var(--mono); font-size: .85rem; margin-top: .25rem; }
.card__badge {
  font-family: var(--mono); font-size: .7rem; padding: .15rem .5rem; border-radius: 5px;
  background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent-2);
}

/* ---------- Hobbies ---------- */
.hobbies { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.hobby {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; text-align: center; font-weight: 500;
}
.hobbies__photos { display: flex; flex-wrap: nowrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.hobbies__photo { flex: 1 1 0; min-width: 0; max-width: 240px; margin: 0; }
.hobbies__photo img {
  width: 100%; aspect-ratio: 1 / 1; display: block; object-fit: cover;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.hobbies__photo figcaption {
  margin-top: .6rem; text-align: center; color: var(--text-dim);
  font-family: var(--mono); font-size: .82rem;
}

/* ---------- Contact / footer ---------- */
.section--contact { text-align: center; }
.contact__lead { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 1.5rem; max-width: 560px; margin-inline: auto; }
.contact__btns { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.contact__btns .btn { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .contact__btns { flex-direction: column; align-items: stretch; }
}
@media (max-width: 400px) {
  .btn--lg { font-size: .92rem; padding: .8rem 1rem; }
}
.footer {
  text-align: center; padding: 2.5rem 1rem; color: var(--text-dim);
  font-family: var(--mono); font-size: .82rem; border-top: 1px solid var(--border);
}

/* Avoid stuck "lifted" hover states on touch devices */
@media (hover: none) {
  .btn:hover, .social:hover, .card:hover { transform: none; }
}

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