:root{
  --bg:#FDFDFB;
  --bg-alt:#F4F4EF;
  --ink:#141416;
  --muted:#61616B;
  --line:#E4E4DC;
  --accent:#1E8E5E;
  --accent-deep:#166F49;
  --accent-soft:#E7F5EE;
  --card:#FFFFFF;
  --nav-bg:rgba(253,253,251,0.85);
  --radius:14px;
  --maxw:1000px;
  --shadow-sm:0 1px 2px rgba(20,20,22,0.05);
  --shadow-md:0 10px 24px rgba(20,20,22,0.08);
  --shadow-lg:0 22px 44px rgba(20,20,22,0.11);
}
*{box-sizing:border-box; margin:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Inter', -apple-system, sans-serif;
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
::selection{background:var(--accent-soft);}
h1,h2,h3{font-family:'Sora', sans-serif; line-height:1.15; letter-spacing:-0.02em;}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 28px;}
a:focus-visible, button:focus-visible{outline:2px solid var(--accent); outline-offset:3px; border-radius:6px;}
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation:none !important; transition:none !important; }
}


html[data-theme="dark"]{
  --bg:#0F1115;
  --bg-alt:#14171C;
  --ink:#E8EAED;
  --muted:#9AA3AD;
  --line:#272C34;
  --card:#1A1E25;
  --nav-bg:rgba(15,17,21,0.85);
  --accent:#3BB981;
  --accent-deep:#2E9C6B;
  --accent-soft:#173226;
  --shadow-sm:0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:0 10px 24px rgba(0,0,0,0.45);
  --shadow-lg:0 22px 44px rgba(0,0,0,0.55);
}
html[data-theme="dark"] .btn-dark{background:#E8EAED; color:#0F1115;}
html[data-theme="dark"] .btn-dark:hover{background:#fff;}
.theme-toggle{
  background:none;
  border:1px solid var(--line);
  border-radius:50%;
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  color:var(--ink);
  transition:border-color .15s ease, transform .18s cubic-bezier(.34,1.4,.64,1);
}
.theme-toggle:hover{border-color:var(--accent); transform:translateY(-2px);}
.theme-toggle svg{width:17px; height:17px;}
.theme-toggle .sun{display:none;}
html[data-theme="dark"] .theme-toggle .sun{display:block;}
html[data-theme="dark"] .theme-toggle .moon{display:none;}
.nav-right{display:flex; align-items:center; gap:14px;}
.nav-resume{
  font-size:14px; font-weight:600;
  text-decoration:none;
  color:var(--accent);
  border:1px solid var(--accent);
  padding:7px 16px;
  border-radius:999px;
  transition:background .15s ease, color .15s ease, transform .18s cubic-bezier(.34,1.4,.64,1), box-shadow .18s ease;
}
.nav-resume:hover{
  background:var(--accent);
  color:#fff;
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
}

/* NAV */
nav{
  position:sticky; top:0; z-index:50;
  background:var(--nav-bg);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  max-width:var(--maxw); margin:0 auto;
  padding:18px 28px;
  display:flex; align-items:center; justify-content:space-between;
}
.nav-logo{
  font-family:'Sora', sans-serif;
  font-weight:800; font-size:18px;
  letter-spacing:-0.03em;
  text-decoration:none; color:var(--ink);
}
.nav-logo span{color:var(--accent);}
.nav-links{display:flex; gap:28px; list-style:none; padding:0;}
.nav-links a{
  font-size:14.5px; font-weight:500;
  text-decoration:none; color:var(--muted);
  transition:color .15s ease;
}
.nav-links a:hover{color:var(--accent);}
.nav-toggle{display:none;}

/* HERO — centered, tilted photo on top */
.hero{
  padding:96px 0 104px;
  text-align:left;
  position:relative;
  overflow:hidden;
}
.hero > .wrap{position:relative; z-index:1;}
.hero-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:48px;
}
.hero-content{flex:1; min-width:0;}
.hero-photo{
  display:block;
  position:relative;
  flex-shrink:0;
}
.hero-photo::before{
  content:"";
  position:absolute;
  top:50%; left:50%;
  transform:translate(-50%, -50%);
  width:480px; height:480px;
  background:radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  z-index:-2;
  pointer-events:none;
}
.hero-photo img{
  width:260px; height:260px;
  object-fit:cover;
  border-radius:26px;
  transform:rotate(-4deg);
  border:5px solid var(--card);
  box-shadow:var(--shadow-lg);
  transition:transform .3s cubic-bezier(.34,1.4,.64,1);
}
.hero-photo::after{
  content:"";
  position:absolute;
  inset:8px -8px -8px 8px;
  border-radius:26px;
  border:2px solid var(--accent);
  transform:rotate(3deg);
  z-index:-1;
  opacity:0.5;
}
.hero-photo:hover img{transform:rotate(0deg) scale(1.05);}
.hero h1{
  font-size:clamp(28px, 3.2vw, 38px);
  font-weight:800;
  margin-bottom:16px;
}
.hero h1 em{
  font-style:normal;
  color:var(--accent);
}
.hero .role{
  font-size:17px; font-weight:500;
  margin-bottom:8px;
}
.hero .blurb{
  font-size:16px; color:var(--muted);
  max-width:50ch;
  margin:0 0 36px;
}
.btn-row{display:flex; flex-wrap:wrap; gap:12px; justify-content:flex-start;}
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family:inherit;
  font-size:15px; font-weight:600;
  text-decoration:none;
  padding:13px 24px;
  border-radius:999px;
  cursor:pointer;
  border:1px solid transparent;
  transition:transform .18s cubic-bezier(.34,1.4,.64,1), box-shadow .18s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover{transform:translateY(-3px); box-shadow:var(--shadow-md);}
.btn-accent{background:var(--accent); color:#fff;}
.btn-accent:hover{background:var(--accent-deep);}
.btn-dark{background:var(--ink); color:#fff;}
.btn-dark:hover{background:#26262B;}
.btn-ghost{background:var(--card); color:var(--ink); border-color:var(--line);}
.btn-ghost:hover{border-color:var(--accent); color:var(--accent);}

/* SECTIONS */
section{padding:84px 0;}
section.alt{background:var(--bg-alt); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.section-head{
  display:flex; align-items:center; gap:18px;
  margin-bottom:46px;
}
.section-head h2{font-size:28px; font-weight:700; white-space:nowrap;}
.section-head .rule{
  flex:1; height:1px;
  background:var(--line);
  position:relative;
}
.section-head .rule::before{
  content:"";
  position:absolute;
  left:0; top:-2px;
  width:48px; height:5px;
  border-radius:3px;
  background:var(--accent);
}

/* SKILLS */
.icon-grid{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:14px;
}
.icon-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:22px 12px;
  display:flex; flex-direction:column; align-items:center; gap:11px;
  text-align:center;
  box-shadow:var(--shadow-sm);
  transition:transform .18s cubic-bezier(.34,1.4,.64,1), box-shadow .18s ease, border-color .18s ease;
}
.icon-card:hover{
  transform:translateY(-6px) scale(1.03);
  box-shadow:var(--shadow-md);
  border-color:var(--accent);
}
.icon-badge{
  width:44px; height:44px;
  border-radius:12px;
  background:var(--accent-soft);
  color:var(--accent);
  display:flex; align-items:center; justify-content:center;
  font-family:'Sora', sans-serif;
  font-size:13px; font-weight:700;
  letter-spacing:-0.02em;
}
.icon-img{
  width:44px; height:44px;
  object-fit:contain;
  transition:transform .18s cubic-bezier(.34,1.4,.64,1);
}
.icon-card:hover .icon-img{transform:scale(1.12);}
.org-logo{
  width:44px; height:44px;
  object-fit:contain;
  border-radius:10px;
  background:#FFFFFF;
  border:1px solid var(--line);
  padding:5px;
  flex-shrink:0;
}
.card-head{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
.card-head > div{flex:1; min-width:0;}
.icon-card span{font-size:13.5px; font-weight:500;}
.practice-row{
  display:flex; flex-wrap:wrap; justify-content:center;
  gap:10px;
  margin-top:26px;
}
.chip{
  font-size:13.5px; font-weight:500;
  padding:8px 16px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  color:var(--muted);
  transition:transform .18s cubic-bezier(.34,1.4,.64,1), box-shadow .18s ease, color .15s ease, border-color .15s ease;
}
.chip:hover{
  transform:translateY(-3px) scale(1.04);
  box-shadow:var(--shadow-md);
  color:var(--accent);
  border-color:var(--accent);
}

/* EXPERIENCE — timeline */
.timeline{
  position:relative;
  padding-left:36px;
}
.timeline::before{
  content:"";
  position:absolute;
  left:9px; top:6px; bottom:6px;
  width:2px;
  background:var(--line);
}
.t-item{
  position:relative;
  padding-bottom:36px;
}
.t-item:last-child{padding-bottom:0;}
.t-item::before{
  content:"";
  position:absolute;
  left:-33px; top:7px;
  width:14px; height:14px;
  border-radius:50%;
  background:var(--accent);
  border:3px solid var(--bg);
  box-shadow:0 0 0 2px var(--accent-soft);
  transition:transform .18s cubic-bezier(.34,1.4,.64,1);
}
.t-item:hover::before{transform:scale(1.35);}
.t-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:26px 28px;
  box-shadow:var(--shadow-sm);
  transition:transform .2s cubic-bezier(.34,1.4,.64,1), box-shadow .2s ease, border-color .2s ease;
}
.t-item:hover .t-card{
  transform:translateX(6px);
  box-shadow:var(--shadow-md);
  border-color:var(--accent);
}
.t-top{
  display:flex; justify-content:space-between; align-items:baseline;
  flex-wrap:wrap; gap:6px;
  margin-bottom:2px;
}
.t-title{font-family:'Sora', sans-serif; font-size:17.5px; font-weight:700;}
.t-date{font-size:13px; color:var(--muted); font-weight:500;}
.t-org{color:var(--accent); font-size:14.5px; font-weight:600; margin-bottom:12px;}
.t-card ul{padding-left:19px; color:var(--muted);}
.t-card li{margin-bottom:6px; font-size:14.5px;}
.t-card li:last-child{margin-bottom:0;}

/* PROJECTS */
.projects{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:20px;
}
.project-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px;
  display:flex; flex-direction:column;
  box-shadow:var(--shadow-sm);
  position:relative;
  overflow:hidden;
  transition:transform .2s cubic-bezier(.34,1.4,.64,1), box-shadow .2s ease, border-color .2s ease;
}
.project-card::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:4px;
  background:var(--accent);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .25s ease;
}
.project-card:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-lg);
  border-color:var(--accent);
}
.project-card:hover::before{transform:scaleX(1);}
.project-card.full{grid-column:1 / -1;}
.project-tag{
  font-size:11.5px; font-weight:700;
  color:var(--accent);
  text-transform:uppercase; letter-spacing:0.09em;
  margin-bottom:10px;
}
.project-card h3{font-size:19px; font-weight:700; margin-bottom:10px;}
.project-meta{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px;}
.mini-chip{
  font-size:12px; font-weight:600;
  color:var(--accent-deep);
  background:var(--accent-soft);
  padding:4px 11px;
  border-radius:12px;
}
.project-card p{color:var(--muted); font-size:14.5px; margin-bottom:18px; flex-grow:1;}
.project-img{
  width:calc(100% + 56px);
  margin:-28px -28px 20px;
  display:block;
  height:210px;
  object-fit:cover;
  border-radius:var(--radius) var(--radius) 0 0;
  border-bottom:1px solid var(--line);
  transition:transform .3s ease;
}
.project-card.full .project-img{height:280px;}
.terminal{
  background:#16181D;
  border-radius:10px;
  margin:-6px 0 20px;
  overflow:hidden;
  font-family:ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  font-size:12.5px;
  line-height:1.7;
}
.terminal-bar{
  background:#22252C;
  padding:8px 14px;
  display:flex;
  gap:6px;
}
.terminal-bar i{
  width:10px; height:10px;
  border-radius:50%;
  background:#3A3F49;
}
.terminal-body{padding:14px 16px; color:#C9D1D9; overflow-x:auto; white-space:pre;}
.terminal-body .cmd{color:#7EE2A8;}
.terminal-body .sev-mod{color:#F0B429;}
.terminal-body .sev-low{color:#8B949E;}
.project-links{display:flex; align-items:center; gap:20px;}
.project-links a{
  font-size:14px; font-weight:600;
  text-decoration:none;
  color:var(--accent);
}
.project-links a:hover{text-decoration:underline;}
.project-links .demo-btn{
  border:1px solid var(--accent);
  padding:8px 18px;
  border-radius:999px;
  transition:background .15s ease, color .15s ease, transform .18s cubic-bezier(.34,1.4,.64,1);
}
.project-links .demo-btn:hover{
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  transform:translateY(-2px);
}

/* EDUCATION */
.edu-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px 30px;
  box-shadow:var(--shadow-sm);
  transition:transform .2s cubic-bezier(.34,1.4,.64,1), box-shadow .2s ease, border-color .2s ease;
}
.edu-card:hover{transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--accent);}
.edu-card + .edu-card{margin-top:16px;}
.edu-top{
  display:flex; justify-content:space-between; align-items:baseline;
  flex-wrap:wrap; gap:6px;
}
.edu-card h3{font-size:18px; font-weight:700;}
.edu-card .date{font-size:13px; color:var(--muted); font-weight:500;}
.edu-card .org{color:var(--accent); font-size:14.5px; font-weight:600; margin:3px 0 10px;}
.edu-card p{color:var(--muted); font-size:14.5px;}
.coursework .label{
  display:block;
  font-size:11.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:0.09em;
  color:var(--ink);
  margin-bottom:5px;
}


.photo-strip{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px;
  margin-top:18px;
}
.photo-strip figure{
  margin:0;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--card);
}
.photo-strip img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  display:block;
  transition:transform .3s ease;
}
.photo-strip figure:hover img{transform:scale(1.05);}
.photo-strip figcaption{
  font-size:11.5px;
  font-weight:600;
  color:var(--muted);
  text-align:center;
  padding:7px 4px;
  border-top:1px solid var(--line);
}
@media (max-width:560px){
  .photo-strip{grid-template-columns:1fr;}
}

/* CONTACT */
.contact{text-align:center; padding:96px 0;}
.contact h2{font-size:clamp(28px, 4.5vw, 40px); font-weight:800; margin-bottom:14px;}
.contact h2 em{font-style:normal; color:var(--accent);}
.contact p{color:var(--muted); max-width:46ch; margin:0 auto 40px;}
.contact-icons{
  display:flex;
  justify-content:center;
  gap:44px;
}
.contact-icon{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--ink);
}
.contact-icon svg{
  width:30px; height:30px;
  transition:transform .18s cubic-bezier(.34,1.4,.64,1), color .15s ease;
}
.contact-icon span{
  font-size:14px;
  font-weight:500;
  transition:color .15s ease;
}
.contact-icon:hover svg{transform:translateY(-4px) scale(1.15); color:var(--accent);}
.contact-icon:hover span{color:var(--accent);}

footer{
  text-align:center;
  padding:24px 0 42px;
  font-size:13px;
  color:var(--muted);
  border-top:1px solid var(--line);
}

/* RESPONSIVE */
@media (max-width:860px){
  .hero{padding:64px 0 76px;}
  .icon-grid{grid-template-columns:repeat(3, 1fr);}
  .projects{grid-template-columns:1fr;}
}
@media (max-width:700px){
  .hero-inner{flex-direction:column-reverse; text-align:center; gap:32px;}
  .hero .blurb{margin:0 auto 36px;}
  .btn-row{justify-content:center;}
  .hero-photo img{width:168px; height:168px;}
}
@media (max-width:760px){
  .nav-links{
    position:fixed; top:61px; left:0; right:0;
    background:var(--bg);
    border-bottom:1px solid var(--line);
    flex-direction:column; gap:0;
    max-height:0; overflow:hidden;
    transition:max-height .25s ease;
  }
  .nav-links.open{max-height:320px;}
  .nav-links a{padding:15px 28px; width:100%; border-top:1px solid var(--line);}
  .nav-toggle{
    display:block;
    background:none;
    border:1px solid var(--line);
    border-radius:8px;
    font-family:inherit;
    font-size:13px; font-weight:600;
    padding:8px 14px;
    cursor:pointer;
  }
  .timeline{padding-left:28px;}
  .t-item::before{left:-25px;}
  .t-item:hover .t-card{transform:none;}
}
