:root {
  --bg-1: #070c17;
  --bg-2: #0d1930;
  --surface: #121f38;
  --surface-2: #182744;
  --text: #edf3ff;
  --muted: #afc0df;
  --accent: #6cb2ff;
  --accent-2: #89f0d1;
  --focus: #ffd166;
  --border: #2d4269;
  --shadow: 0 14px 40px rgba(5, 12, 27, 0.35);
  --pointer-x: 50vw;
  --pointer-y: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(360px 260px at var(--pointer-x) var(--pointer-y), rgba(108, 178, 255, 0.12), transparent 72%),
    radial-gradient(1200px 550px at 15% -5%, #1d3563 0%, transparent 65%),
    radial-gradient(900px 420px at 85% 0%, #0b2e4a 0%, transparent 65%),
    linear-gradient(170deg, var(--bg-2), var(--bg-1));
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--focus);
  color: #111;
  padding: 10px 14px;
  border-radius: 8px;
}

.skip-link:focus-visible {
  left: 12px;
  top: 12px;
  z-index: 1000;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(175, 192, 223, 0.15);
  backdrop-filter: blur(12px);
  background: rgba(7, 12, 23, 0.82);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.logo-mark {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(108, 178, 255, 0.22);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.logo-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.logo-domain {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: lowercase;
}

.nav-links {
  display: flex;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(108, 178, 255, 0.13);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
}

.hero {
  padding: 72px 0 40px;
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 24px;
}

.hero-panel,
.linkedin-card,
.card,
.skills-card {
  border: 1px solid rgba(175, 192, 223, 0.15);
  border-radius: 16px;
  background: linear-gradient(170deg, rgba(24, 39, 68, 0.87), rgba(14, 25, 44, 0.86));
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 34px 32px;
}

.hero-panel,
.linkedin-card,
.section,
.footer {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.hero-panel.is-visible,
.linkedin-card.is-visible,
.section.is-visible,
.footer.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-2);
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.05rem, 4.2vw, 3.2rem);
  max-width: 15ch;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  font-size: 1.12rem;
}

.hero-copy {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.04rem;
}

.hero-copy-secondary {
  margin-top: 14px;
}

.cta-row {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(5, 12, 27, 0.35);
}

.btn.primary {
  color: #081427;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), #8dc4ff);
}

.linkedin-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
  transform: var(--tilt, translateY(0));
  transition: border-color 180ms ease, transform 180ms ease;
}

.portrait-frame {
  position: relative;
  width: min(100%, 190px);
  margin: -4px auto 18px;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(137, 240, 209, 0.55);
  background: var(--surface-2);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.92) contrast(1.04);
}

.portrait-status {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  border: 1px solid rgba(137, 240, 209, 0.35);
  border-radius: 7px;
  color: var(--text);
  background: rgba(7, 12, 23, 0.78);
  font-size: 0.68rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

.linkedin-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -25px;
  bottom: -35px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(137, 240, 209, 0.34), transparent 72%);
}

.section {
  padding: 34px 0 18px;
}

.grid {
  margin-top: 14px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  padding: 18px;
  transform: var(--tilt, translateY(0));
  transition: border-color 180ms ease, transform 180ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(108, 178, 255, 0.58);
}

.card a {
  color: #d4e5ff;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

.card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.article-dialog {
  width: min(760px, 92vw);
  max-height: 84vh;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-dialog::backdrop {
  background: rgba(3, 7, 16, 0.78);
}

.dialog-close {
  float: right;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

#article-body {
  color: var(--muted);
}

#article-body h1,
#article-body h2,
#article-body h3 {
  color: var(--text);
  margin-top: 1.4em;
}

#article-body a {
  color: var(--accent);
}

#article-body img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 1.1em auto 1.4em;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #0b1220;
}

#article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1em 0 1.3em;
  font-size: 0.92rem;
}

#article-body th,
#article-body td {
  border: 1px solid var(--border);
  padding: 0.45em 0.65em;
  text-align: left;
}

#article-body tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  color: #d8e7ff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  line-height: 1.5;
  background: rgba(108, 178, 255, 0.12);
}

.badge.status-live {
  background: rgba(137, 240, 209, 0.12);
  border-color: rgba(137, 240, 209, 0.4);
}

.two-col {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.35fr 1fr;
}

.skills-card {
  padding: 22px;
}

.skills-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.loading .card {
  position: relative;
  overflow: hidden;
}

.loading .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.footer {
  padding: 30px 0 42px;
  color: var(--muted);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 22ch;
  }
}

@media (max-width: 760px) {
  .logo-domain {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 4%;
    flex-direction: column;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(10, 16, 31, 0.95);
    min-width: 180px;
  }

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

  .two-col {
    grid-template-columns: 1fr;
  }
}

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

  .hero-panel,
  .linkedin-card,
  .section,
  .footer {
    opacity: 1;
    transform: none;
  }
}
