:root {
  --page: #111111;
  --shell: #151515;
  --surface: #1b1b1b;
  --surface-2: #202020;
  --text: #f4f2ed;
  --muted: #92908a;
  --line: #30302f;
  --accent: #f07d12;
  --accent-2: #ff982f;
  --dark-text: #111111;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  line-height: 1.7;
}

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

.site-shell {
  width: min(1220px, calc(100% - 48px));
  margin: 18px auto;
  padding: 0 48px;
  background: var(--shell);
  border: 2px solid #363636;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

/* NAV */
.header {
  min-height: 82px;
  display: flex;
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1220px, calc(100% - 48px));
  padding: 0 48px;
  z-index: 1000;
  background: rgba(21, 21, 21, .97);
  backdrop-filter: blur(12px);
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.logo {
  color: var(--accent);
  font: 800 1.15rem/1 "Manrope", sans-serif;
  letter-spacing: -.07em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0 auto;
}

.nav a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.header-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--dark-text);
  font-weight: 700;
  border-radius: 5px;
  transition: transform .2s ease, background .2s ease;
}

.header-button {
  padding: 10px 19px;
  font-size: .78rem;
}

@media (hover: hover) {
  .header-button:hover,
  .primary-button:hover {
    background: var(--accent-2);
    transform: translateY(-2px);
  }
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  padding: 5px;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px;
  background: var(--text);
}

/* Reserve space for the fixed navigation */
.site-shell > main {
  padding-top: 82px;
}

/* HERO */
.hero {
  min-height: 625px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 45px;
  padding: 55px 0 65px;
}

.hero-copy {
  max-width: 570px;
}

.hello {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: .95rem;
}

.hero h1 {
  margin: 0;
  font: 800 clamp(3.5rem, 7vw, 5.9rem)/.95 "Manrope", sans-serif;
  letter-spacing: -.075em;
}

.hero h1 span {
  color: var(--accent);
}

.hero .role {
  margin: 16px 0 0;
  color: var(--accent);
  font: 800 clamp(2rem, 4.2vw, 3.55rem)/1 "Manrope", sans-serif;
  letter-spacing: -.065em;
}

.hero-description {
  max-width: 490px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.socials {
  display: flex;
  gap: 9px;
  margin-top: 24px;
}

.socials a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #41413f;
  border-radius: 50%;
  color: var(--muted);
  font-size: .63rem;
  font-weight: 700;
  transition: .2s ease;
}

.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 29px;
}

.primary-button,
.secondary-button {
  padding: 12px 21px;
  font-size: .72rem;
}

.secondary-button {
  border: 1px solid #555552;
  border-radius: 5px;
  color: var(--muted);
  transition: border-color .2s ease, color .2s ease;
}

.secondary-button:hover {
  color: var(--text);
  border-color: var(--text);
}

/* PHOTO */
.hero-photo-wrap {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
}

.photo-halo {
  position: absolute;
  width: min(440px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #202020;
  border: 1px solid #2b2b2b;
}

.photo-ring {
  position: relative;
  width: min(365px, 76%);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  border: 10px solid #171717;
  box-shadow: 0 0 0 1px #393939;
  background: #242424;
}

.photo-ring img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(.8);
}

.photo-note {
  position: absolute;
  right: 4%;
  bottom: 58px;
  padding: 9px 13px;
  border: 1px solid #3b3b3a;
  border-radius: 4px;
  background: rgba(21, 21, 21, .88);
  color: var(--muted);
  font-size: .62rem;
}

/* SECTIONS */
.section {
  padding: 105px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 125px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
}

.section-label span {
  color: var(--accent);
  font-size: .64rem;
  font-weight: 700;
}

.section-label p {
  margin: 0;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.section-content {
  min-width: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 100px;
  max-width: 980px;
}

.about-grid h2 {
  margin: 0;
  font: 700 clamp(2rem, 4vw, 3.3rem)/1.08 "Manrope", sans-serif;
  letter-spacing: -.06em;
}

em {
  color: var(--accent);
  font-style: normal;
}

.about-grid > div {
  color: var(--muted);
  font-size: .98rem;
}

.about-grid > div p:first-child {
  margin-top: 0;
}

.about-grid > div p:last-child {
  margin-bottom: 0;
}

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

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  transition: transform .22s ease, border-color .22s ease;
}

@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-5px);
    border-color: #50504d;
  }
}

.project-image {
  height: 215px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  overflow: hidden;
  background: #202020;
  border-bottom: 1px solid var(--line);
}

.project-image::before,
.project-image::after {
  content: "";
  position: absolute;
  border: 1px solid #373735;
  border-radius: 50%;
}

.project-image::before {
  width: 250px;
  height: 250px;
  right: -80px;
  top: -100px;
}

.project-image::after {
  width: 160px;
  height: 160px;
  left: -65px;
  bottom: -85px;
}

.project-image-one { background: #1d2420; }
.project-image-two { background: #20221d; }
.project-image-three { background: #241f1a; }

.project-image > * { position: relative; z-index: 1; }
.project-image > span {
  position: absolute;
  top: 19px;
  left: 21px;
  color: var(--accent);
  font-size: .62rem;
  font-weight: 700;
}

.project-image strong {
  font: 800 1.6rem/.95 "Manrope", sans-serif;
  letter-spacing: -.05em;
}

.project-image small {
  margin-top: 8px;
  color: var(--muted);
  font-size: .57rem;
  letter-spacing: .12em;
}

.project-card-body { padding: 20px; }

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-card-top h3 {
  margin: 0;
  font: 700 1rem/1.2 "Manrope", sans-serif;
  letter-spacing: -.025em;
}

.project-card-top a {
  color: var(--accent);
  font-size: 1rem;
}

.project-description {
  min-height: 62px;
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: .76rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-stack span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #363634;
  border-radius: 4px;
  color: var(--muted);
  font-size: .66rem;
}

.project-stack i { font-size: .75rem; color: var(--accent); }

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.skill {
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.skill > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #3d3d3b;
  border-radius: 9px;
  color: var(--accent);
  font-size: 2rem;
}

.skill > span i {
  font-size: 2rem;
  line-height: 1;
}

.skill-text-icon {
  font: 800 .8rem/1 "Manrope", sans-serif;
  letter-spacing: -.03em;
}

.skill strong {
  min-width: 0;
  font: 700 1.2rem/1.2 "Manrope", sans-serif;
  letter-spacing: -.03em;
}

.skill small {
  color: var(--muted);
  font-size: .72rem;
  white-space: nowrap;
}

/* CONTACT */
.contact {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 100px;
  padding: 115px 0 105px;
  border-top: 1px solid var(--line);
}

.contact .hello {
  font-size: .8rem;
}

.contact h2 {
  margin: 16px 0 0;
  font: 800 clamp(3rem, 6vw, 5.2rem)/.96 "Manrope", sans-serif;
  letter-spacing: -.07em;
}

.contact-right {
  align-self: end;
}

.contact-right > p {
  max-width: 430px;
  margin: 0 0 27px;
  color: var(--muted);
  font-size: .85rem;
}

.email {
  max-width: 460px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid #555552;
  font: 600 .9rem "Manrope", sans-serif;
}

.contact-socials {
  display: flex;
  gap: 22px;
  margin-top: 19px;
}

.contact-socials a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
}

.contact-socials a:hover {
  color: var(--accent);
}

.contact-socials i {
  font-size: .85rem;
}

/* FOOTER */
.footer {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .62rem;
}

.footer a {
  color: var(--text);
  font-weight: 700;
}

/* MOBILE */
@media (max-width: 850px) {
  .site-shell {
    width: min(100% - 24px, 1220px);
    padding: 0 28px;
    margin: 12px auto;
    border-radius: 19px;
  }

  .nav {
    gap: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 65px;
  }

  .hero-copy {
    max-width: 650px;
  }

  .hero-photo-wrap {
    min-height: 440px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .photo-note {
    right: 12%;
  }

  .about-grid,
  .contact {
    grid-template-columns: 1fr;
    gap: 45px;
  }
}

@media (max-width: 650px) {
  .site-shell {
    padding: 0 19px;
  }

  .site-shell > main {
    padding-top: 70px;
  }

  .header {
    min-height: 70px;
    top: 12px;
    width: calc(100% - 24px);
    padding: 0 19px;
    border-radius: 19px 19px 0 0;
  }

  .nav {
    display: none;
    position: absolute;
    top: 71px;
    left: 19px;
    right: 19px;
    z-index: 10;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 7px 17px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 13px 0;
    font-size: .82rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .header-button {
    margin-left: auto;
    padding: 9px 13px;
  }

  .menu-button {
    display: block;
  }

  .hero {
    min-height: auto;
    gap: 25px;
    padding: 65px 0 75px;
  }

  .hero h1 {
    font-size: 3.65rem;
  }

  .hero h2 {
    font-size: 2.35rem;
  }

  .hero-photo-wrap {
    min-height: 365px;
  }

  .photo-halo {
    width: 315px;
  }

  .photo-ring {
    width: 275px;
  }

  .photo-note {
    right: 1%;
    bottom: 20px;
  }

  .section {
    padding: 78px 0;
  }

  .about-grid h2 {
    font-size: 2.25rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill {
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 92px;
    padding: 16px;
  }

  .skill > span {
    width: 48px;
    height: 48px;
  }

  .skill small {
    display: none;
  }

  .contact {
    padding: 80px 0;
  }

  .footer {
    min-height: 65px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

}


/* ================= FIXES & ADDITIONS ================= */
:root { --gap: 18px; --shell-w: min(1220px, calc(100% - 48px)); --pad: 48px; }
@media (max-width: 850px) { :root { --gap: 12px; --shell-w: calc(100% - 24px); --pad: 28px; } }
@media (max-width: 650px) { :root { --pad: 19px; } }
.site-shell {
  width: var(--shell-w); margin: var(--gap) auto; padding: 0 var(--pad);
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
}
/* header always sits inside the shell, with matching corners */
.header { top: calc(var(--gap) + 2px); width: calc(var(--shell-w) - 4px); padding: 0 var(--pad); border-radius: 23px 23px 0 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 2000; background: var(--accent); color: var(--dark-text); padding: 10px 16px; border-radius: 6px; font-weight: 700; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
/* readable sizes (nothing under 12px) */
.nav a { font-size: .92rem; } .header-button { font-size: .88rem; }
.primary-button, .secondary-button { font-size: .88rem; padding: 14px 24px; min-height: 46px; }
.photo-note { font-size: .8rem; } .section-label span { font-size: .8rem; } .section-label p { font-size: .8rem; }
.project-description { font-size: .92rem; } .project-stack span { font-size: .8rem; } .project-image small { font-size: .78rem; }
.project-image > span { font-size: .75rem; } .skill small { font-size: .8rem; } .contact-socials a { font-size: .88rem; } .footer { font-size: .85rem; }
.contact-right > p { font-size: .98rem; } .hello { font-size: 1rem; }
.socials a { width: 42px; height: 42px; font-size: 1.15rem; }
.menu-button { width: 46px; height: 46px; cursor: pointer; }
.project-card-top a { padding: 6px 8px; }
.skill > span { overflow: hidden; }
.email[hidden], [hidden] { display: none !important; }
/* nav collapses into the menu button below 850px (fixes cramped tablet header) */
@media (max-width: 850px) {
  .menu-button { display: block; margin-left: 0; }
  .header-button { margin-left: auto; }
  .nav { display: none; position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; z-index: 10; flex-direction: column; align-items: stretch; gap: 0; padding: 7px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; font-size: .95rem; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
}
.menu-button[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.menu-button span { transition: transform .25s ease; }
.hero, #contact { scroll-margin-top: 105px; }
/* ---- Intro animation: text rises out of a mask, in sequence ---- */
.w { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.ch { display: inline-block; }
.ch.acc { color: var(--accent); }
.js .ch { transform: translateY(118%); animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards; }
.js .fade { opacity: 0; transform: translateY(14px); animation: fadeUp .8s ease forwards; animation-delay: var(--d, 0s); }
.js .hero-photo-wrap { opacity: 0; transform: scale(.94); animation: fadeUp .9s ease .5s forwards; }
@keyframes rise { to { transform: none; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.hero .role { white-space: normal; }
/* ---- Marquee ---- */
.nav a.active { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
}

/* ---- Follow-up fixes: keep original look after markup changes ---- */
.hero h1 .w, .hero h1 .ch { color: var(--text); }
.hero h1 .ch.acc { color: var(--accent); }
.hero .role .w, .hero .role .ch { color: var(--accent); }
.about-title { margin: 0; font: 700 clamp(2rem, 4vw, 3.3rem)/1.08 "Manrope", sans-serif; letter-spacing: -.06em; }
.section-label h2 { margin: 0; color: var(--muted); font: 600 .8rem/1.7 "DM Sans", sans-serif; text-transform: uppercase; letter-spacing: .11em; }
.hero-actions { flex-wrap: wrap; }
.primary-button, .secondary-button, .header-button { white-space: nowrap; }
@media (max-width: 650px) { .header-button { font-size: .8rem; padding: 9px 12px; } }

/* HERO DETAILS */
.hero-details { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.hero-details li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .85rem; }
.hero-details svg { color: var(--accent); flex: none; }
.hero-details a:hover { color: var(--accent); }
.socials svg { width: 1em; height: 1em; }
.email.phone { border-top: 0; }

/* OPEN TO WORK */
.open-badge { display: inline-flex; align-items: center; gap: 9px; margin: 18px 0 0; padding: 7px 14px; border: 1px solid rgba(74,222,128,.35); border-radius: 999px; background: rgba(74,222,128,.08); color: #86efac; font-size: .8rem; font-weight: 600; }
.open-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2s infinite; }
.contact-right > .open-badge { margin: 0 0 18px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
@media (prefers-reduced-motion: reduce) { .open-badge .dot { animation: none; } }
.loc { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--muted); font-size: .85rem; }
.loc svg { color: var(--accent); }

/* SKILL GROUPS */
.skills-groups { display: grid; gap: 34px; }
.skill-group-title { margin: 0 0 14px; color: var(--accent); font: 700 .8rem "Manrope", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.skill { min-height: 92px; grid-template-columns: 58px minmax(0, 1fr); }

/* LANGUAGES */
.lang-block { margin-top: 34px; }
.lang-bar { display: flex; height: 10px; overflow: hidden; border-radius: 999px; background: var(--line); }
.lang-bar .py { flex: 1; background: #3776ab; }
.lang-bar .js { flex: 1; background: #f0db4f; }
.lang-list { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 16px 0 0; padding: 0; list-style: none; }
.lang-list li { display: flex; align-items: center; gap: 8px; font: 700 .95rem "Manrope", sans-serif; }
.lang-list i { color: var(--accent); }
.lang-list small { color: var(--muted); font: 500 .8rem "DM Sans", sans-serif; }

/* =====================================================================
   POLISH PASS: spacing rhythm, typography, matching elements, motion
   (button + card hover ideas adapted from 21st.dev: sliding-fill hover
   buttons and cursor-following card spotlight, rebuilt in plain CSS/JS)
   ===================================================================== */
:root { --radius: 8px; --ease-out: cubic-bezier(.2, .8, .2, 1); --sec-y: clamp(72px, 9vw, 112px); }

/* ---- Typography: one tracking scale, one body size ---- */
.hero h1 { letter-spacing: -.055em; }
.hero .role { letter-spacing: -.045em; }
.about-title { letter-spacing: -.045em; line-height: 1.1; }
.contact h2 { letter-spacing: -.055em; }
.logo { letter-spacing: -.05em; }
.hero-description, .about-grid > div, .contact-right > p { font-size: 1rem; line-height: 1.75; }
.project-card-top h3 { font-size: 1.08rem; letter-spacing: -.02em; }
.project-description { font-size: .92rem; line-height: 1.65; }
.hello { font-size: .95rem; letter-spacing: .01em; }
.contact .hello { font-size: .95rem; }
.hero-details li { font-size: .92rem; }
.skill-group-title { font-size: .82rem; letter-spacing: .14em; }
.section-label { gap: 12px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-label h2 { letter-spacing: .12em; }

/* ---- Spacing rhythm ---- */
.section { padding: var(--sec-y) 0; }
.hero { min-height: 560px; padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 100px); gap: clamp(32px, 5vw, 64px); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero-copy > * { margin: 0; }
.hero-copy .hello { margin-bottom: 6px; }
.hero-copy .role { margin-top: 14px; }
.hero-copy .open-badge { margin-top: 20px; }
.hero-copy .hero-description { margin-top: 20px; }
.hero-copy .socials { margin-top: 24px; }
.hero-copy .hero-details { margin-top: 22px; }
.hero-copy .hero-actions { margin-top: 32px; }
.about-grid { grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 8vw, 110px); max-width: none; align-items: start; }
.about-grid > div p { margin: 0 0 1em; }
.about-grid > div p:last-child { margin-bottom: 0; }
.about-title { padding-top: .1em; max-width: 14em; }
.projects-grid { gap: 24px; }
.contact { padding: clamp(72px, 9vw, 112px) 0 clamp(64px, 8vw, 100px); gap: clamp(40px, 8vw, 100px); align-items: end; }
.contact h2 { margin-top: 14px; }
.contact-right > p { margin-bottom: 26px; }
.email { padding: 14px 0; }
.footer { min-height: 72px; }

/* ---- Project cards: equal height, bottom-aligned tags, spotlight ---- */
.project-card { position: relative; display: flex; flex-direction: column; border-radius: 10px; transition: transform .35s var(--ease-out), border-color .3s ease, box-shadow .35s ease; }
.project-image { flex: none; }
.project-card-body { flex: 1; display: flex; flex-direction: column; padding: 22px; }
.project-description { min-height: 0; flex: 1; margin: 12px 0 20px; }
.project-stack { margin-top: auto; }
.project-card::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(240, 125, 18, .13), transparent 62%); }
.project-image::before, .project-image::after { transition: transform .6s var(--ease-out); }
.project-card-top a { display: grid; place-items: center; width: 34px; height: 34px; margin: -6px -6px -6px 0; border: 1px solid var(--line); border-radius: 50%; transition: transform .3s var(--ease-out), background .25s ease, color .25s ease, border-color .25s ease; }
.project-card-top h3 { transition: color .25s ease; }
.project-stack span { transition: border-color .25s ease, color .25s ease; }
@media (hover: hover) {
  .project-card:hover { transform: translateY(-6px); border-color: rgba(240, 125, 18, .55); box-shadow: 0 18px 40px rgba(0, 0, 0, .28); }
  .project-card:hover::after { opacity: 1; }
  .project-card:hover .project-image::before { transform: scale(1.12) translate(-6px, 6px); }
  .project-card:hover .project-image::after { transform: scale(1.18) translate(6px, -6px); }
  .project-card:hover .project-card-top h3 { color: var(--accent); }
  .project-card:hover .project-stack span { border-color: #4a4a47; color: var(--text); }
  .project-card-top a:hover { background: var(--accent); border-color: var(--accent); color: var(--dark-text); transform: translate(2px, -2px) rotate(8deg); }
}

/* ---- Skills: separate tiles, a label column, no empty grid holes ---- */
.skills-groups { gap: clamp(28px, 4vw, 40px); }
.skill-group { display: grid; grid-template-columns: minmax(110px, 190px) 1fr; gap: 14px clamp(24px, 4vw, 48px); align-items: start; }
.skill-group-title { margin: 0; padding-top: 14px; }
.skills-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; border: 0; }
.skill { min-height: 78px; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: transform .3s var(--ease-out), border-color .25s ease, background .25s ease; }
.skill > span { width: 46px; height: 46px; border-radius: 9px; font-size: 1.7rem; transition: transform .3s var(--ease-out), background .25s ease, border-color .25s ease; }
.skill > span i { font-size: 1.7rem; }
.skill strong { font-size: 1.02rem; }
@media (hover: hover) {
  .skill:hover { transform: translateY(-3px); border-color: rgba(240, 125, 18, .5); background: var(--surface-2); }
  .skill:hover > span { transform: scale(1.08) rotate(-4deg); background: rgba(240, 125, 18, .1); border-color: rgba(240, 125, 18, .5); }
}

/* ---- Buttons: one shape, one height, sliding-fill hover ---- */
.header-button, .primary-button, .secondary-button { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: var(--radius); font-weight: 700; letter-spacing: .01em; transition: color .3s ease, border-color .3s ease, transform .3s var(--ease-out), box-shadow .35s ease; }
.header-button { min-height: 40px; padding: 0 18px; }
.primary-button, .secondary-button { min-height: 46px; padding: 0 24px; }
.header-button::before, .primary-button::before, .secondary-button::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.header-button::before, .primary-button::before { background: #fff1de; }
.secondary-button { background: transparent; }
.secondary-button::before { background: var(--text); }
.header-button span, .primary-button span { display: inline-block; transition: transform .3s var(--ease-out); }
.header-button:active, .primary-button:active, .secondary-button:active { transform: scale(.97); }
@media (hover: hover) {
  .header-button:hover, .primary-button:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(240, 125, 18, .3); }
  .secondary-button:hover { color: var(--dark-text); border-color: var(--text); transform: translateY(-2px); }
  .header-button:hover::before, .primary-button:hover::before, .secondary-button:hover::before { transform: scaleX(1); }
  .header-button:hover span, .primary-button:hover span { transform: translate(3px, -3px); }
}

/* ---- Other hover / link polish ---- */
.socials a { transition: color .25s ease, border-color .25s ease, background .25s ease, transform .3s var(--ease-out); }
.email { transition: color .25s ease, border-color .25s ease; }
.email span { display: inline-block; transition: transform .3s var(--ease-out); }
.contact-socials a, .footer a { transition: color .25s ease, transform .3s var(--ease-out); }
.hero-details a { transition: color .2s ease; }
@media (hover: hover) {
  .socials a:hover { background: var(--accent); border-color: var(--accent); color: var(--dark-text); transform: translateY(-3px); }
  .email:hover { color: var(--accent); border-color: var(--accent); }
  .email:hover span { transform: translate(3px, -3px); }
  .contact-socials a:hover { transform: translateY(-2px); }
  .footer a:hover { color: var(--accent); transform: translateY(-2px); }
  .logo { transition: transform .3s var(--ease-out); } .logo:hover { transform: scale(1.06); }
}

/* ---- Motion ---- */
.progress { position: fixed; top: 0; left: 0; z-index: 2000; width: 100%; height: 3px; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .photo-ring { animation: float 7s ease-in-out 3s infinite; }
.photo-halo { animation: breathe 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes breathe { 50% { transform: scale(1.035); } }
.section-label span { display: inline-block; transition: transform .4s var(--ease-out); }

/* ---- Responsive ---- */
@media (max-width: 850px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contact { align-items: start; }
}
@media (max-width: 650px) {
  .projects-grid { grid-template-columns: 1fr; }
  .skill-group { grid-template-columns: 1fr; }
  .skill-group-title { padding-top: 0; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .skill { grid-template-columns: 1fr; justify-items: start; gap: 10px; min-height: 0; padding: 14px; }
  .skill > span { width: 44px; height: 44px; }
  .hero { padding-top: 40px; }
  .hero-copy .hero-actions { margin-top: 28px; }
  .project-card-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
}


/* ---- Heading word-rise (About + Contact headings) ---- */
.rw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.rw > span { display: inline-block; transform: translateY(112%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--w, 0) * 70ms); }
.rw-go .rw > span { transform: none; }

/* soft fades so the page still feels alive, drop movement  */
@keyframes fadeIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .ch { transform: none; opacity: 0; animation-name: fadeIn; }
  .js .fade { transform: none; animation-name: fadeIn; }
  .js .hero-photo-wrap { transform: none; animation-name: fadeIn; }
  .js .reveal { transform: none; }
  .rw > span { transform: none; opacity: 0; transition: opacity .9s ease; transition-delay: calc(var(--w, 0) * 70ms); }
  .rw-go .rw > span { opacity: 1; }
  .js .photo-ring, .photo-halo { animation: none; }
  .project-card:hover, .skill:hover, .project-card-top a:hover { transform: none; }
  .project-card:hover .project-image::before, .project-card:hover .project-image::after { transform: none; }
  .primary-button:hover span, .header-button:hover span, .email:hover span { transform: none; }
}
