:root {
  color-scheme: light dark;
  --bg: #f7f8fb;
  --bg-strong: #ffffff;
  --text: #111318;
  --muted: #606775;
  --soft: #e7eaf0;
  --line: rgba(18, 24, 32, 0.12);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --accent: #0bbf9a;
  --accent-strong: #07987d;
  --accent-soft: rgba(11, 191, 154, 0.12);
  --warm: #ff6b61;
  --shadow: 0 24px 80px rgba(15, 18, 25, 0.13);
  --radius: 8px;
  --max: 1180px;
}

[data-theme="dark"] {
  --bg: #080a0d;
  --bg-strong: #101318;
  --text: #f7f8fb;
  --muted: #a6adbb;
  --soft: #1b2028;
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(18, 21, 27, 0.68);
  --glass-strong: rgba(18, 21, 27, 0.9);
  --accent: #38d8b2;
  --accent-strong: #51e3bf;
  --accent-soft: rgba(56, 216, 178, 0.12);
  --warm: #ff7a70;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080a0d;
    --bg-strong: #101318;
    --text: #f7f8fb;
    --muted: #a6adbb;
    --soft: #1b2028;
    --line: rgba(255, 255, 255, 0.12);
    --glass: rgba(18, 21, 27, 0.68);
    --glass-strong: rgba(18, 21, 27, 0.9);
    --accent: #38d8b2;
    --accent-strong: #51e3bf;
    --accent-soft: rgba(56, 216, 178, 0.12);
    --warm: #ff7a70;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 10%, rgba(11, 191, 154, 0.13), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(255, 107, 97, 0.08), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Segoe UI, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  width: min(calc(100% - 32px), var(--max));
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(24px);
  transform: translateX(-50%);
}

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

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

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #06110f;
  background: linear-gradient(135deg, var(--accent), #b7f3e5);
}

.nav-links {
  gap: 8px;
}

.nav-links a,
.site-footer a {
  color: var(--muted);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-strong);
  cursor: pointer;
}

.theme-icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  border: 2px solid var(--text);
  border-radius: 999px;
  box-shadow: inset 7px -4px 0 var(--text);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  width: min(calc(100% - 44px), var(--max));
  margin: 0 auto;
  padding: 126px 0 76px;
}

.hero-bg {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(11, 191, 154, 0.12), transparent 28%),
    linear-gradient(225deg, rgba(255, 107, 97, 0.08), transparent 32%),
    linear-gradient(180deg, transparent 0%, var(--bg) 92%);
}

.grid-light {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 65%);
  opacity: 0.22;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(4.2rem, 13vw, 11rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero h2 {
  max-width: 860px;
  margin: 28px 0 0;
  font-size: clamp(2rem, 5.2vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #06110f;
  background: linear-gradient(135deg, var(--accent), #b9f4e7);
  box-shadow: 0 16px 38px rgba(11, 191, 154, 0.25);
}

.button.secondary {
  background: var(--glass);
  backdrop-filter: blur(18px);
}

.hero-console {
  align-self: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
  overflow: hidden;
}

.console-top {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.console-lines {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.console-lines p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.console-lines strong {
  display: inline-block;
  min-width: 78px;
  color: var(--text);
}

.section {
  width: min(calc(100% - 44px), var(--max));
  margin: 0 auto;
  padding: 94px 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.section-heading.split {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.03;
}

.glass,
.skill-card,
.timeline-item,
.app-card,
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(22px);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 18px;
}

.about-copy {
  align-self: start;
  padding: clamp(24px, 4vw, 44px);
}

.about-copy p,
.blog-preview p,
.contact-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.78;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.about-stats div {
  display: grid;
  gap: 8px;
}

.about-stats strong {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1;
}

.about-stats span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.about-side {
  align-self: stretch;
  display: block;
}

.profile-card {
  position: relative;
  margin: 0;
  height: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.74));
  pointer-events: none;
}

.profile-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 18%;
}

.profile-card figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 7px;
  color: #ffffff;
}

.profile-card figcaption span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-card figcaption strong {
  font-size: 1.25rem;
  line-height: 1.25;
}

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

.skill-card,
.app-card,
.project-card {
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.skill-card:hover,
.app-card:hover,
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11, 191, 154, 0.42);
  box-shadow: 0 24px 70px rgba(11, 191, 154, 0.12);
}

.skill-icon,
.project-kicker {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.skill-card h3,
.app-card h3,
.project-card h3,
.timeline-item h3 {
  margin: 18px 0 8px;
  font-size: 1.2rem;
}

.skill-card p,
.app-card p,
.project-card p,
.timeline-item p,
.timeline-item li {
  color: var(--muted);
  line-height: 1.6;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  position: relative;
  padding: 24px 24px 24px 64px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 30px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 8px var(--accent-soft);
}

.timeline-item h3 {
  margin-top: 0;
}

.timeline-meta {
  color: var(--accent-strong);
  font-weight: 800;
}

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

.text-link {
  color: var(--accent-strong);
  font-weight: 800;
}

.app-status {
  color: var(--muted);
  margin-bottom: 18px;
}

.app-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 260px;
}

.app-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--soft);
}

.app-icon-fallback {
  display: grid;
  place-items: center;
  color: #06110f;
  font-size: 1.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #d7fff5);
}

.app-card h3 {
  margin: 0;
}

.app-card p {
  margin: 18px 0;
}

.app-link {
  justify-self: start;
  color: var(--text);
  font-weight: 800;
  border-bottom: 2px solid var(--accent);
}

.project-card {
  overflow: hidden;
  padding: 0;
}

.project-media {
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(11, 191, 154, 0.18), rgba(255, 107, 97, 0.12)),
    var(--soft);
}

.project-media img {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.project-body {
  padding: 22px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--glass-strong);
  font-size: 0.86rem;
}

.blog-preview {
  padding: 28px;
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  padding: clamp(24px, 5vw, 54px);
}

.contact-links {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.contact-links a {
  color: var(--accent-strong);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-strong);
  color: var(--text);
  padding: 14px 15px;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.contact-form textarea {
  resize: vertical;
}

.site-footer {
  width: min(calc(100% - 44px), var(--max));
  margin: 0 auto;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .site-header {
    top: 10px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 118px;
  }

  .hero-console {
    align-self: auto;
  }

  .about-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .about-side {
    display: block;
  }

  .profile-card {
    height: 460px;
    min-height: 0;
  }

  .skill-grid,
  .app-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .section,
  .site-footer {
    width: min(calc(100% - 28px), var(--max));
  }

  h1 {
    font-size: clamp(4.1rem, 22vw, 6rem);
  }

  .hero h2,
  .section h2 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .hero-actions,
  .section-heading.split,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .skill-grid,
  .app-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .about-side {
    grid-template-columns: 1fr;
  }

  .profile-card,
  .profile-card img {
    min-height: 0;
  }

  .profile-card {
    height: 360px;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    padding-left: 24px;
  }

  .timeline-item::before {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
