:root {
  color-scheme: light;
  --page: #eee8dc;
  --panel: rgba(255, 255, 255, 0.6);
  --panel-strong: rgba(255, 255, 255, 0.78);
  --text: #070707;
  --muted: rgba(7, 7, 7, 0.66);
  --soft: rgba(7, 7, 7, 0.08);
  --line: rgba(7, 7, 7, 0.12);
  --accent: #111111;
  --teal: #14b8a6;
  --cream: #f5efe3;
  --shadow: 0 34px 100px rgba(42, 32, 20, 0.28);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.45;
  background:
    linear-gradient(rgba(238, 232, 220, 0.42), rgba(238, 232, 220, 0.36)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2200&q=82")
      center / cover fixed,
    var(--page);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(16, 11, 6, 0.42), transparent 34%, rgba(128, 86, 42, 0.18)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(16, 11, 6, 0.28));
  pointer-events: none;
}

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

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

.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 5vw, 64px);
}

.glass-stage {
  min-width: 0;
  min-height: calc(100vh - clamp(28px, 10vw, 128px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(18px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: clamp(28px, 5vw, 42px);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
  overflow: hidden;
}

.site-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 22px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar {
  width: clamp(38px, 4vw, 46px);
  height: clamp(38px, 4vw, 46px);
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.brand-text {
  display: grid;
  letter-spacing: 0;
}

.brand-text strong {
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1;
  font-weight: 720;
  white-space: nowrap;
}

.top-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px clamp(12px, 2vw, 28px);
  padding: 6px 8px;
  color: rgba(7, 7, 7, 0.72);
  font-size: 14px;
  font-weight: 650;
}

.top-nav a,
.nav-button,
.primary-action,
.portrait-content a,
.strip-card a,
.contact-links a {
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.top-nav a {
  white-space: nowrap;
}

.top-nav a:hover,
.nav-button:hover,
.primary-action:hover,
.portrait-content a:hover,
.strip-card a:hover,
.contact-links a:hover {
  transform: translateY(-2px);
}

.nav-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 24px;
  border: 1px solid rgba(7, 7, 7, 0.55);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
}

.hero-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(310px, 0.78fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
  align-self: end;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: rgba(7, 7, 7, 0.68);
  font-size: 13px;
  font-weight: 800;
}

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

h1 {
  max-width: 780px;
  margin-bottom: clamp(24px, 4vw, 48px);
  font-size: clamp(52px, 8.5vw, 116px);
  line-height: 0.94;
  font-weight: 500;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-bottom {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 640px;
}

.hero-bottom p {
  max-width: 320px;
  margin: 0;
  color: rgba(7, 7, 7, 0.72);
  font-size: 16px;
  line-height: 1.22;
  font-weight: 600;
}

.primary-action {
  min-height: 58px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 26px;
  border-radius: 999px;
  background: #050505;
  color: #ffffff;
  font-size: 15px;
  font-weight: 750;
}

.hero-projects {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-self: start;
}

.portrait-card {
  min-height: clamp(300px, 33vw, 430px);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 26px;
  border-radius: 24px;
  color: #ffffff;
  isolation: isolate;
  background: #111111;
}

.portrait-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--card-image) center / cover;
  transform: scale(1.02);
}

.portrait-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 42%, rgba(0, 0, 0, 0.68)),
    rgba(0, 0, 0, 0.08);
}

.studyble-card {
  --card-image: url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=900&q=82");
}

.revo-card {
  --card-image: url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=900&q=82");
}

.portrait-card > span {
  font-size: 15px;
  font-weight: 800;
}

.portrait-content {
  display: grid;
  gap: 12px;
}

.portrait-content strong {
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 550;
}

.portrait-content a {
  width: fit-content;
  display: inline-flex;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  font-weight: 750;
}

.project-strip {
  display: grid;
  grid-template-columns: minmax(230px, 0.95fr) minmax(230px, 0.95fr) minmax(260px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.strip-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 24px;
  background: rgba(244, 248, 238, 0.62);
  box-shadow: 0 20px 54px rgba(42, 32, 20, 0.1);
  backdrop-filter: blur(20px);
}

.strip-card h2 {
  margin-bottom: 12px;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
  font-weight: 650;
}

.strip-card p {
  margin-bottom: 20px;
  color: rgba(7, 7, 7, 0.68);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
}

.strip-card a {
  width: fit-content;
  font-weight: 850;
}

.line-icon {
  width: 42px;
  height: 42px;
  display: block;
  margin-bottom: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 34%, rgba(7, 7, 7, 0.82) 36%, transparent 39%),
    conic-gradient(from 0deg, transparent, rgba(7, 7, 7, 0.7), transparent, rgba(7, 7, 7, 0.7), transparent);
}

.code-icon {
  border-radius: 12px;
  background:
    linear-gradient(135deg, transparent 42%, rgba(7, 7, 7, 0.82) 43% 56%, transparent 57%),
    linear-gradient(45deg, transparent 42%, rgba(7, 7, 7, 0.82) 43% 56%, transparent 57%);
}

.bright-card {
  background: rgba(255, 252, 246, 0.68);
}

.image-card {
  min-height: 210px;
  flex-direction: row;
  align-items: flex-end;
  gap: 20px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(7, 7, 7, 0.28), rgba(7, 7, 7, 0.74)),
    url("https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?auto=format&fit=crop&w=900&q=82")
      center / cover;
}

.image-card img {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 22px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25);
}

.image-card p {
  color: rgba(255, 255, 255, 0.82);
}

.content-section {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 68px);
  align-items: start;
  margin-top: 26px;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 22px 72px rgba(42, 32, 20, 0.14);
  backdrop-filter: blur(24px);
}

.content-section h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 70px);
  line-height: 0.98;
  font-weight: 520;
}

.content-section p {
  margin: 0;
  color: rgba(7, 7, 7, 0.72);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.38;
  font-weight: 580;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid rgba(7, 7, 7, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  font-weight: 800;
}

.site-footer {
  width: min(1440px, 100%);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 26px clamp(18px, 5vw, 64px) 42px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #10100e;
    --panel: rgba(18, 18, 16, 0.62);
    --panel-strong: rgba(24, 24, 22, 0.78);
    --text: #f8fafc;
    --muted: rgba(248, 250, 252, 0.72);
    --line: rgba(248, 250, 252, 0.14);
    --soft: rgba(248, 250, 252, 0.1);
    --shadow: 0 34px 100px rgba(0, 0, 0, 0.38);
  }

  body {
    background:
      linear-gradient(rgba(14, 14, 12, 0.28), rgba(14, 14, 12, 0.54)),
      url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2200&q=82")
        center / cover fixed,
      var(--page);
  }

  body::before {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 36%, rgba(0, 0, 0, 0.22)),
      linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.46));
  }

  .glass-stage,
  .content-section,
  .strip-card {
    border-color: rgba(255, 255, 255, 0.14);
    background: var(--panel);
  }

  .top-nav,
  .hero-bottom p,
  .strip-card p,
  .content-section p {
    color: rgba(248, 250, 252, 0.72);
  }

  .nav-button {
    border-color: rgba(248, 250, 252, 0.45);
  }

  .eyebrow,
  .contact-links a {
    background: rgba(255, 255, 255, 0.09);
    color: rgba(248, 250, 252, 0.78);
  }

  .primary-action {
    background: #f8fafc;
    color: #070707;
  }

  .bright-card,
  .muted-card {
    background: rgba(22, 22, 20, 0.7);
  }

  .line-icon {
    filter: invert(1);
    opacity: 0.85;
  }
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
  }

  .glass-stage {
    min-height: auto;
  }

  .hero-layout,
  .project-strip,
  .content-section {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    align-self: start;
  }
}

@media (max-width: 680px) {
  .page-shell {
    padding: 12px;
  }

  .glass-stage {
    gap: 28px;
    padding: 16px;
    border-radius: 28px;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .brand-avatar {
    width: 36px;
    height: 36px;
  }

  .brand-text strong {
    font-size: 22px;
  }

  .nav-button {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 38px;
    padding: 9px 16px;
  }

  h1 {
    font-size: clamp(39px, 12.5vw, 48px);
    line-height: 1;
  }

  .hero-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-bottom p {
    max-width: none;
  }

  .primary-action {
    width: 100%;
  }

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

  .portrait-card {
    min-height: 260px;
    padding: 20px;
    border-radius: 22px;
  }

  .strip-card,
  .content-section {
    padding: 22px;
    border-radius: 22px;
  }

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

  .contact-links {
    flex-direction: column;
  }

  .contact-links a {
    justify-content: center;
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    padding: 22px 16px 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
