:root {
  color-scheme: dark;
  --bg: #050908;
  --surface: rgba(10, 18, 17, 0.72);
  --surface-strong: rgba(12, 22, 21, 0.92);
  --line: rgba(159, 255, 230, 0.14);
  --line-strong: rgba(159, 255, 230, 0.28);
  --text: #f5f7f4;
  --muted: #b7c4c0;
  --soft: #7e918d;
  --accent: #11e6b3;
  --accent-strong: #00bd92;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

body.light-mode {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(0, 120, 96, 0.16);
  --line-strong: rgba(0, 120, 96, 0.3);
  --text: #17201d;
  --muted: #465451;
  --soft: #66736f;
  --accent: #008d70;
  --accent-strong: #006e57;
  --shadow: 0 24px 80px rgba(30, 48, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr) 34px;
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 14%, rgba(17, 230, 179, 0.08), transparent 22rem),
    radial-gradient(circle at 84% 22%, rgba(255, 180, 107, 0.055), transparent 20rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

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

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

.background-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  pointer-events: none;
}

.site-header,
.screen,
.site-footer {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 1380px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 1.55rem;
  font-weight: 760;
  line-height: 1;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  transform: translateY(-1px);
}

.icon-button svg,
.button svg,
.contact-link svg,
.email-output svg,
.profile-links svg {
  width: 1.12rem;
  height: 1.12rem;
  flex: 0 0 auto;
}

i[data-lucide] {
  display: inline-grid;
  place-items: center;
  min-width: 1.12rem;
  min-height: 1.12rem;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

i[data-lucide="sun"]::before {
  content: "O";
}

i[data-lucide="moon"]::before {
  content: "C";
}

i[data-lucide="mail"]::before {
  content: "@";
}

i[data-lucide="send"]::before {
  content: ">";
}

i[data-lucide="github"]::before {
  content: "git";
}

i[data-lucide="map-pin"]::before {
  content: ".";
}

i[data-lucide="linkedin"]::before {
  content: "in";
}

.screen {
  display: grid;
  grid-template-rows: minmax(0, 1.1fr) minmax(150px, 0.62fr);
  gap: 1rem;
  min-height: 0;
  padding: 1rem 0;
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 2rem;
  min-height: 0;
  align-items: center;
  overflow: hidden;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-kicker,
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 750;
  text-transform: uppercase;
}

.eyebrow span,
.status-label span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(17, 230, 179, 0.7);
}

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

h1 {
  max-width: 8.5em;
  margin-bottom: 0.25rem;
  font-size: 3.95rem;
  line-height: 1.02;
  font-weight: 830;
}

.name-line {
  display: block;
  white-space: nowrap;
}

.role {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 1.28rem;
  font-weight: 720;
}

.lead {
  max-width: 650px;
  margin-bottom: 1.35rem;
  color: var(--muted);
  font-size: 1rem;
}

.mobile-break {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.9rem;
  padding: 0 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-weight: 760;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

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

.button-primary {
  border-color: rgba(17, 230, 179, 0.48);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #03110e;
  box-shadow: 0 16px 38px rgba(0, 189, 146, 0.2);
}

.button-secondary {
  background: rgba(8, 16, 15, 0.54);
  color: var(--text);
}

body.light-mode .button-secondary {
  background: rgba(255, 255, 255, 0.72);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-links a,
.profile-links span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.75rem;
}

.profile-links svg,
.profile-links i {
  color: var(--accent);
}

.portrait-card {
  position: relative;
  align-self: stretch;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 17, 16, 0.04), rgba(9, 17, 16, 0.85)),
    var(--surface);
  box-shadow: var(--shadow);
}

.portrait-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(90deg, rgba(17, 230, 179, 0.1), transparent 35%),
    linear-gradient(180deg, transparent 46%, rgba(5, 9, 8, 0.82));
  pointer-events: none;
}

.portrait-card img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: center top;
}

.status-card {
  position: absolute;
  top: 1.2rem;
  left: min(49%, calc(100% - 700px));
  z-index: 3;
  width: 292px;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(7, 16, 15, 0.88);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

body.light-mode .status-card {
  background: rgba(255, 255, 255, 0.9);
}

.status-card p:not(.status-label) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.66fr) minmax(280px, 0.82fr);
  gap: 1rem;
  min-height: 0;
  overflow: hidden;
}

.info-panel {
  min-width: 0;
  min-height: 0;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.info-panel h2 {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
  line-height: 1.2;
}

.info-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.tech-grid span {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.7rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  font-weight: 760;
}

.tech-grid img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.contact-panel p {
  margin-bottom: 0.85rem;
}

.contact-link,
.email-output {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 100%;
  color: var(--accent);
  font-weight: 740;
  overflow-wrap: anywhere;
}

.contact-link {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.contact-link:hover,
.email-output:hover {
  color: var(--text);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.86rem;
}

@media (max-width: 1040px) {
  body {
    grid-template-rows: 64px minmax(0, 1fr) 30px;
  }

  .site-header,
  .screen,
  .site-footer {
    width: min(100% - 32px, 1380px);
  }

  .screen {
    grid-template-rows: minmax(0, 1fr) minmax(126px, auto);
    gap: 0.8rem;
    padding: 0.8rem 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
    gap: 1.2rem;
  }

  .status-card {
    display: none;
  }

  h1 {
    font-size: 3.1rem;
  }

  .lead {
    font-size: 0.94rem;
  }

  .info-grid {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.55fr);
    gap: 0.8rem;
  }

  .contact-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    display: block;
    min-height: 100svh;
    font-size: 14px;
  }

  .brand {
    font-size: 1.3rem;
  }

  .icon-button {
    width: 2.25rem;
    height: 2.25rem;
  }

  .site-header {
    min-height: 58px;
  }

  .screen {
    display: block;
    min-height: auto;
    padding: 1.2rem 0 0.75rem;
    overflow: visible;
  }

  .hero {
    display: block;
    overflow: visible;
  }

  .eyebrow,
  .section-kicker,
  .status-label {
    margin-bottom: 0.45rem;
    font-size: 0.68rem;
  }

  .hero .eyebrow {
    display: none;
  }

  h1 {
    font-size: 2rem;
    line-height: 1;
  }

  .role {
    margin-bottom: 0.45rem;
    font-size: 1rem;
  }

  .lead {
    display: block;
    margin-bottom: 0.75rem;
    overflow: visible;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .mobile-break {
    display: block;
  }

  .button {
    min-height: 2.45rem;
    padding: 0 0.85rem;
    font-size: 0.86rem;
  }

  .profile-links {
    gap: 0.35rem 0.7rem;
    font-size: 0.78rem;
  }

  .portrait-card img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    object-position: center center;
  }

  .info-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: 0.85rem;
    overflow: visible;
  }

  .info-panel {
    padding: 0.75rem;
  }

  .about-panel {
    display: none;
  }

  .contact-panel {
    grid-column: 1 / -1;
  }

  .info-panel h2 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
  }

  .info-panel p,
  .contact-link,
  .email-output {
    font-size: 0.84rem;
  }

  .tech-grid {
    gap: 0.45rem;
  }

  .tech-grid span {
    min-height: 2rem;
    padding: 0 0.65rem;
    font-size: 0.82rem;
  }

  .tech-grid img {
    width: 1.15rem;
    height: 1.15rem;
  }

  .site-footer {
    min-height: 32px;
    font-size: 0.76rem;
  }
}

@media (max-width: 560px) {
  .site-header,
  .screen,
  .site-footer {
    width: min(100% - 24px, 370px);
  }

  .screen {
    padding-top: 1rem;
  }

  .hero {
    display: block;
  }

  .portrait-card {
    display: block;
    width: 126px;
    height: 154px;
    min-height: 0;
    margin-top: 0.65rem;
  }

  .portrait-card::before {
    background:
      linear-gradient(90deg, rgba(17, 230, 179, 0.08), transparent 34%),
      linear-gradient(180deg, transparent 54%, rgba(5, 9, 8, 0.68));
  }

  .portrait-card img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    object-position: center center;
  }

  .profile-links {
    max-width: none;
  }

  .profile-links a,
  .profile-links span {
    min-height: 1.35rem;
  }

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

  .tech-panel,
  .contact-panel {
    grid-column: auto;
  }

  .lead,
  .info-panel p {
    overflow-wrap: break-word;
  }

  .contact-panel p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 480px) {
  .site-header,
  .screen,
  .site-footer {
    width: min(100% - 20px, 370px);
  }

  .screen {
    gap: 0.55rem;
    padding: 0.85rem 0 0.65rem;
  }

  .hero {
    display: block;
  }

  .portrait-card {
    width: 120px;
    height: 146px;
  }

  h1 {
    font-size: 1.72rem;
    line-height: 1.02;
  }

  .lead {
    display: block;
    overflow: visible;
    margin-bottom: 0.55rem;
    font-size: 0.76rem;
    line-height: 1.38;
  }

  .button {
    min-height: 2.2rem;
    padding: 0 0.7rem;
    font-size: 0.8rem;
  }

  .profile-links {
    max-width: 210px;
  }

  .info-panel {
    padding: 0.62rem;
  }

  .contact-panel p {
    display: none;
  }
}

@media (max-height: 720px) and (min-width: 721px) {
  body {
    grid-template-rows: 58px minmax(0, 1fr) 28px;
    font-size: 14px;
  }

  .screen {
    grid-template-rows: minmax(0, 1fr) minmax(132px, 0.45fr);
    gap: 0.7rem;
    padding: 0.7rem 0;
  }

  h1 {
    font-size: 3rem;
  }

  .lead {
    margin-bottom: 0.9rem;
    font-size: 0.91rem;
  }

  .button {
    min-height: 2.55rem;
  }

  .info-panel {
    padding: 0.9rem;
  }

  .info-panel h2 {
    font-size: 1.05rem;
  }

  .about-panel p,
  .contact-panel p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .tech-grid span {
    min-height: 2.25rem;
  }
}

@media (max-height: 560px) and (min-width: 721px) {
  .about-panel {
    display: none;
  }

  .info-grid {
    grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1fr);
  }

  .contact-panel {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
