/* ============================================================
   TOKENS
   ============================================================ */
:root{
  --navy: #0B0F14;
  --slate: #121821;
  --ice: #E8EDF2;
  --gray: #8B98A7;
  --purple: #6C63FF;
  --cyan: #00D4FF;
  --steel: #202936;

  --header-bg: rgba(11,15,20,0.82);
  --shadow-lg: 0 30px 60px -30px rgba(0,0,0,0.6);
  --shadow-glow: 0 25px 50px -20px rgba(108,99,255,0.45);

  --grad: linear-gradient(100deg, var(--purple), var(--cyan));

  --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;

  --wrap: 1160px;
  --radius: 14px;
  --radius-sm: 9px;

  --ease: cubic-bezier(.22,.9,.32,1);
}

/* Light theme — intentionally re-balanced, not just an inversion:
   softer off-white surfaces, deep-navy text, a slightly deepened
   cyan so it still passes contrast on white. */
[data-theme="light"]{
  --navy: #F3F5F8;
  --slate: #FFFFFF;
  --ice: #10151C;
  --gray: #5B6672;
  --purple: #6C63FF;
  --cyan: #0092A8;
  --steel: #DDE3E9;

  --header-bg: rgba(243,245,248,0.86);
  --shadow-lg: 0 25px 50px -28px rgba(16,21,28,0.18);
  --shadow-glow: 0 20px 40px -20px rgba(108,99,255,0.28);
}

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

html{
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--navy);
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

/* smooth, subtle theme transition across the key surfaces */
.site-header, .site-footer, .tool-card, .project-card, .contact-card,
.about-photo__ring img, .form-field input, .form-field textarea,
.btn, .social-link, .nav-link, .theme-toggle, .connect-btn, .tag,
.main-nav, .about-quote{
  transition: background-color .3s ease, color .3s ease,
    border-color .3s ease, box-shadow .3s ease;
}

img, svg{ display:block; max-width: 100%; }

a{ color: inherit; text-decoration: none; }

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

::selection{ background: var(--purple); color: var(--ice); }

:focus-visible{
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* subtle grain / vignette so the navy background isn't flat */
.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 82% 0%, rgba(108,99,255,0.10), transparent 60%),
    radial-gradient(45% 40% at 0% 30%, rgba(0,212,255,0.06), transparent 60%);
}

/* ============================================================
   TYPE
   ============================================================ */
h1,h2,h3{
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

.kicker{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before{
  content: "";
  width: 16px;
  height: 1px;
  background: var(--cyan);
  display: inline-block;
}
.kicker--light{ color: var(--purple); }
.kicker--light::before{ background: var(--purple); }

.section-title{
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  max-width: 640px;
  margin-bottom: 18px;
}

.body-text{
  color: var(--gray);
  max-width: 52ch;
  font-size: 1.02rem;
}

.text-grad{
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn svg{ flex: none; }
.btn:hover{ transform: translateY(-2px); }

.btn-primary{
  background: var(--grad);
  color: #0B0F14;
  font-weight: 700;
  box-shadow: 0 10px 24px -10px rgba(108,99,255,0.55);
}
.btn-primary:hover{ box-shadow: 0 14px 30px -10px rgba(0,212,255,0.55); }

.btn-outline{
  border-color: var(--steel);
  color: var(--ice);
  background: transparent;
}
.btn-outline:hover{ border-color: var(--purple); color: var(--ice); }

.btn-ghost{
  color: var(--ice);
  padding: 13px 6px;
}
.btn-ghost:hover{ color: var(--cyan); }

.btn-sm{ padding: 9px 16px; font-size: 0.85rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--steel);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand-mark{
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--grad);
  color: #0B0F14;
  font-size: 0.95rem;
}

.main-nav{
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-link{
  position: relative;
  font-size: 0.92rem;
  color: var(--gray);
  padding: 6px 0;
  transition: color .2s var(--ease);
}
.nav-link:hover{ color: var(--ice); }
.nav-link.is-active{ color: var(--ice); }
.nav-link.is-active::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

.header-actions{
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle{
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--steel);
  border-radius: 10px;
  color: var(--gray);
  cursor: pointer;
}
.theme-toggle:hover{ color: var(--cyan); border-color: var(--cyan); }
.theme-toggle .icon-moon{ display: none; }
[data-theme="light"] .theme-toggle .icon-sun{ display: none; }
[data-theme="light"] .theme-toggle .icon-moon{ display: block; }

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--steel);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span{
  width: 16px;
  height: 2px;
  background: var(--ice);
  margin: 0 auto;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity: 0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero{
  position: relative;
  padding: 130px 0 90px;
  overflow: hidden;
  text-align: center;
}

.hero-inner{
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-kicker{ justify-content: center; }

.hero-title{
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  margin: 0 0 10px;
}

.hero-role{
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 500;
  color: var(--gray);
  margin: 0 0 20px;
}

.hero-lead{
  color: var(--gray);
  font-size: 1.08rem;
  max-width: 50ch;
  margin: 0 0 34px;
}

.hero-actions{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-social{
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 56px;
}
.social-link{
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--steel);
  border-radius: 10px;
  color: var(--gray);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.social-link:hover{ color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }

.scroll-cue{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray);
  transition: color .2s var(--ease);
}
.scroll-cue:hover{ color: var(--cyan); }
.scroll-cue svg{ animation: bounceDown 2.2s ease-in-out infinite; }
@keyframes bounceDown{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(6px); } }

/* ============================================================
   ABOUT
   ============================================================ */
.about{ padding: 90px 0; border-top: 1px solid var(--steel); }

.about-inner{
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
}

.about-photo{
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.about-photo__ring{
  width: 320px;
  height: 320px;
  border-radius: 50%;
  padding: 6px;
  background: var(--grad);
  box-shadow: var(--shadow-glow);
}
.about-photo__ring img{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--navy);
  display: block;
}

.about-subhead{
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 34px 0 14px;
  color: var(--ice);
}

.about-quote{
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--ice);
  border-left: 2px solid var(--cyan);
  padding: 4px 0 4px 18px;
  margin: 8px 0 22px;
  max-width: 46ch;
}

/* ============================================================
   TOOLKIT
   ============================================================ */
.toolkit{ padding: 90px 0; border-top: 1px solid var(--steel); }

.tool-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
}

.tool-card{
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--slate);
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.tool-card:hover{ border-color: var(--tool, var(--purple)); transform: translateY(-3px); }

.tool-icon{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tool) 14%, var(--navy));
  flex: none;
}

.tool-name{ margin: 0 0 2px; font-weight: 600; font-size: 0.96rem; }
.tool-desc{ margin: 0; color: var(--gray); font-size: 0.82rem; }

/* ============================================================
   WORK
   ============================================================ */
.work{ padding: 90px 0; border-top: 1px solid var(--steel); }

.work-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.link-more{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--gray);
  white-space: nowrap;
  padding-bottom: 8px;
  transition: color .2s var(--ease);
}
.link-more:hover{ color: var(--cyan); }

.project-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card{
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 440px;
  background: var(--slate);
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
  /* the photo backgrounds always carry a dark scrim (below), so force
     light-on-dark text/borders here regardless of the active theme */
  --ice: #F5F7FA;
  --gray: #C3CBD4;
  --steel: rgba(255,255,255,0.22);
}
.project-card:hover{ border-color: var(--purple); transform: translateY(-4px); }

.project-bg{
  position: absolute;
  inset: 0;
  background-color: var(--navy);
  background-size: cover;
  background-position: top center;
  transition: transform .5s var(--ease);
}
.project-card:hover .project-bg{ transform: scale(1.05); }

.project-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(11,15,20,0.05) 0%,
    rgba(11,15,20,0.55) 46%,
    rgba(11,15,20,0.96) 82%);
}

.project-body{
  position: relative;
  z-index: 2;
  padding: 22px 22px 26px;
}

.project-title{
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--ice);
}
.project-desc{
  color: var(--gray);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.tag-row{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ice);
  background: rgba(18,24,33,0.7);
  border: 1px solid var(--steel);
  border-radius: 999px;
  padding: 5px 11px;
}

.project-cta{ width: 100%; justify-content: center; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact{
  padding: 96px 0;
  border-top: 1px solid var(--steel);
  background:
    radial-gradient(60% 100% at 100% 0%, rgba(0,212,255,0.08), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgba(108,99,255,0.10), transparent 60%);
}

.contact-head{ max-width: 640px; margin: 0 auto 48px; text-align: center; }
.contact-head .kicker{ justify-content: center; }
.contact-head .section-title{ max-width: none; margin-left: auto; margin-right: auto; }
.contact-lead{ margin: 0 auto; }

.contact-grid{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

.contact-card{
  background: var(--slate);
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-lg);
}

.contact-card-title{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  margin: 0 0 22px;
  color: var(--ice);
}
.contact-card-title svg{ color: var(--cyan); flex: none; }

.contact-form{ display: flex; flex-direction: column; }

.form-field{ margin-bottom: 18px; }
.form-field label{
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 7px;
}
.form-field input,
.form-field textarea{
  width: 100%;
  background: var(--navy);
  border: 1px solid var(--steel);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder{ color: var(--gray); opacity: 0.75; }
.form-field input:focus,
.form-field textarea:focus{ outline: none; border-color: var(--cyan); }

.contact-submit{ width: 100%; justify-content: center; margin-top: 4px; }

.form-note{
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--gray);
  text-align: center;
}

.contact-side{ display: flex; flex-direction: column; gap: 22px; }

.contact-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-list li{
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray);
  font-size: 0.92rem;
}
.contact-list li svg{ color: var(--cyan); flex: none; }
.contact-list li a{ color: var(--gray); transition: color .2s var(--ease); }
.contact-list li a:hover{ color: var(--ice); }

.connect-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.connect-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--steel);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ice);
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.connect-btn:hover{ border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

.availability-status{
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ice);
}
.status-dot{
  width: 9px; height: 9px; border-radius: 50%;
  background: #21c46d;
  box-shadow: 0 0 0 3px rgba(33,196,109,0.2);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer{
  border-top: 1px solid var(--steel);
  padding: 28px 0;
}
.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--gray);
  font-size: 0.85rem;
}
.footer-links{ display: flex; gap: 22px; }
.footer-links a{ color: var(--gray); transition: color .2s var(--ease); }
.footer-links a:hover{ color: var(--ice); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px){
  .about-inner{ grid-template-columns: 1fr; }
  .about-photo{ position: static; flex-direction: row; justify-content: flex-start; }
  .about-photo__ring{ width: 220px; height: 220px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .project-grid{ grid-template-columns: 1fr 1fr; }
  .tool-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px){
  .main-nav{
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--steel);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 6px 28px 18px;
    display: none;
  }
  .main-nav.is-open{ display: flex; }
  .nav-link{ width: 100%; padding: 12px 0; border-bottom: 1px solid var(--steel); }
  .nav-toggle{ display: flex; }
  .header-actions .btn-outline{ display: none; }

  .hero{ padding: 100px 0 60px; }

  .about, .toolkit, .work{ padding: 64px 0; }
  .project-grid{ grid-template-columns: 1fr; }
  .tool-grid{ grid-template-columns: 1fr; }
  .work-head{ flex-direction: column; align-items: flex-start; }
  .contact{ padding: 64px 0; }
  .connect-grid{ grid-template-columns: 1fr; }
}
