:root {
  --bg: #070a12;
  --bg-soft: #0d1321;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #f7fbff;
  --muted: #aab6c5;
  --line: rgba(255, 255, 255, 0.14);
  --blue: #38bdf8;
  --green: #4ade80;
  --red: #f04444;
  --gold: #f6c85f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(240, 68, 68, 0.13), transparent 24rem),
    linear-gradient(135deg, #050711 0%, #0b1220 44%, #111827 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

button {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(7, 10, 18, 0.76);
  backdrop-filter: blur(22px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

.brand,
.site-nav,
.social-row,
.hero-actions,
.contact-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #04111e;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.site-nav {
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  transition: 180ms ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--panel);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.section-pad {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 56px;
  min-height: 100vh;
  align-items: center;
  padding-top: 138px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 30px;
  font-size: clamp(4.1rem, 11vw, 9rem);
  line-height: 0.86;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.15rem, 5vw, 4.6rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.hero-lead,
.about-body p,
.contact-panel p {
  color: var(--muted);
  font-size: 1.17rem;
  line-height: 1.8;
}

.hero-lead {
  max-width: 680px;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 22px;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  transition: 200ms ease;
}

.btn.primary {
  color: #04111e;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-color: transparent;
}

.btn.ghost {
  background: var(--panel);
}

.btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn:hover,
.contact-links a:hover,
.project-links a:hover {
  transform: translateY(-2px);
}

.social-row {
  flex-wrap: wrap;
  gap: 10px;
}

.social-row a {
  color: var(--muted);
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 620px;
}

.portrait-wrap {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 44px;
  background:
    linear-gradient(160deg, rgba(56, 189, 248, 0.16), transparent 38%),
    linear-gradient(22deg, rgba(240, 68, 68, 0.18), transparent 45%),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.portrait-wrap img {
  width: 100%;
  height: 620px;
  object-fit: contain;
  object-position: center bottom;
}

.floating-card {
  position: absolute;
  display: grid;
  min-width: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 10, 18, 0.76);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.floating-card strong {
  font-size: 2rem;
}

.floating-card span {
  color: var(--muted);
}

.card-top {
  top: 130px;
  left: 0;
}

.card-bottom {
  right: 24px;
  bottom: 48px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1180px, calc(100% - 32px));
  margin: -40px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.065);
  backdrop-filter: blur(18px);
}

.stats-strip div {
  min-height: 112px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.stats-strip div:last-child {
  border-right: 0;
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.stats-strip span {
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.section-heading.centered {
  max-width: 780px;
  margin: 0 auto 42px;
  text-align: center;
}

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

.skill-card,
.project-card,
.timeline-item,
.education-card,
.cert-card,
.contact-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.skill-card {
  min-height: 180px;
  padding: 26px;
  border-radius: 22px;
}

.skill-card p,
.project-card p,
.timeline-item p,
.timeline-item li,
.cert-card p,
.education-card p,
.edu-meta span {
  color: var(--muted);
  line-height: 1.65;
}

.projects-section {
  width: min(1260px, calc(100% - 32px));
}

.project-card {
  display: flex;
  min-height: 100%;
  overflow: hidden;
  border-radius: 28px;
  flex-direction: column;
  cursor: pointer;
  transition: 220ms ease;
}

.project-card:hover {
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-4px);
}

.project-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.project-shot {
  position: relative;
  display: grid;
  height: 300px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.22), transparent 12rem),
    linear-gradient(135deg, var(--shot-a), var(--shot-b));
}

.project-shot.has-image {
  height: 300px;
  background: #07111f;
}

.project-shot.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.phone-frame {
  width: 132px;
  height: 212px;
  padding: 12px;
  border: 6px solid rgba(5, 8, 18, 0.88);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.28);
}

.phone-frame div {
  height: 100%;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6)),
    linear-gradient(135deg, var(--shot-a), var(--shot-b));
}

.project-shot span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #07111f;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.8rem;
  font-weight: 900;
}

.project-body {
  display: flex;
  gap: 18px;
  height: 100%;
  padding: 24px;
  flex-direction: column;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dce8f6;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.project-links a {
  padding: 10px 13px;
  border-radius: 999px;
  color: #07111f;
  background: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  transition: 180ms ease;
}

.project-links a.secondary,
.project-links a.details-link {
  color: var(--text);
  background: var(--panel-strong);
}

.project-links a.details-link {
  color: #04111e;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.detail-header {
  position: sticky;
}

.detail-nav {
  display: flex;
}

.project-detail-page {
  padding-top: 28px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(320px, 1.06fr);
  gap: 42px;
  min-height: 92vh;
  align-items: center;
  padding-top: 112px;
}

.detail-copy h1 {
  font-size: clamp(3.6rem, 9vw, 8rem);
}

.detail-tags {
  margin-top: 28px;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.2), transparent 14rem),
    linear-gradient(135deg, var(--shot-a), var(--shot-b));
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  height: min(680px, 76vh);
  object-fit: contain;
}

.detail-section {
  padding-top: 24px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.gallery-item img {
  width: 100%;
  height: auto;
}

.detail-empty {
  min-height: 100vh;
  padding-top: 180px;
}

.timeline {
  display: grid;
  max-width: 900px;
  gap: 18px;
  margin: 0 auto;
}

.timeline-item {
  padding: 28px;
  border-radius: 26px;
}

.timeline-item span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  font-weight: 900;
}

.timeline-item ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

.education-section {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  padding-top: 24px;
}

.education-card,
.cert-card {
  padding: 30px;
  border-radius: 28px;
}

.education-card {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.edu-meta {
  display: grid;
  min-width: 190px;
  gap: 6px;
  text-align: right;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 28px;
  padding: 36px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.18), transparent 50%),
    linear-gradient(315deg, rgba(74, 222, 128, 0.14), transparent 46%),
    var(--panel);
}

.contact-links {
  align-items: stretch;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.contact-links a {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
  transition: 180ms ease;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 42px;
  color: var(--muted);
}

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

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: 650ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .detail-hero,
  .two-column,
  .education-section,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    min-height: auto;
  }

  .hero-visual {
    min-height: 560px;
  }

  .portrait-wrap {
    left: 50%;
    transform: translateX(-50%);
  }

  .skill-grid,
  .project-grid,
  .detail-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-strip div:nth-child(2) {
    border-right: 0;
  }

  .stats-strip div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .education-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .edu-meta {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .site-header {
    border-radius: 20px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(7, 10, 18, 0.96);
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.open {
    display: flex;
  }

  .detail-nav {
    display: flex;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    flex-direction: row;
  }

  .detail-nav a {
    padding: 10px 12px;
  }

  .site-nav a {
    padding: 13px 14px;
  }

  .section-pad {
    padding: 72px 0;
  }

  .hero {
    padding-top: 124px;
  }

  .detail-hero {
    padding-top: 98px;
  }

  h1 {
    font-size: clamp(3.55rem, 18vw, 5.5rem);
  }

  h2 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .hero-visual {
    min-height: 500px;
  }

  .portrait-wrap img {
    height: 500px;
  }

  .floating-card {
    min-width: 118px;
    padding: 14px;
  }

  .card-top {
    top: 40px;
  }

  .card-bottom {
    right: 4px;
    bottom: 24px;
  }

  .skill-grid,
  .project-grid,
  .detail-gallery,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .detail-cover img {
    height: auto;
    max-height: none;
  }

  .stats-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats-strip div:last-child {
    border-bottom: 0;
  }

  .project-shot {
    height: 240px;
  }

  .project-shot.has-image {
    height: 240px;
  }

  .site-footer {
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
}
