/* ── @property: animate gradient angles ── */
@property --glow-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ── Theme variables ── */
:root {
  --bg: oklch(12% 0.008 280);
  --text: oklch(98% 0.002 280);
  --accent: oklch(86% 0.18 112);
  --accent-dim: oklch(86% 0.18 112 / 12%);
  --accent-glow: oklch(86% 0.18 112 / 25%);
  --glass-bg: oklch(100% 0 0 / 3%);
  --glass-border: oklch(100% 0 0 / 8%);
  --surface: oklch(16% 0.008 280);
  --radius: 12px;
}

/* ── Reset / base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

::selection {
  background: var(--accent);
  color: #000;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: oklch(65% 0.01 280);
  margin-bottom: 12px;
  display: block;
}

/* ── Header ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: oklch(12% 0.008 280 / 80%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.logo::before {
  content: '> ';
  color: #555;
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(75% 0.01 280);
  position: relative;
  padding: 8px 12px;
  display: inline-block;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  transition: transform 0.3s;
  transform: scaleX(0);
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a:hover {
  color: var(--text);
}

/* ── Hero ── */
.hero {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  padding: 0 24px;
}

.hero .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: oklch(75% 0.005 280);
  cursor: pointer;
  padding: 6px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  background: var(--glass-bg);
  transition: all 0.3s;
  margin-bottom: 32px;
  font-family: 'JetBrains Mono', monospace;
}

.hero .tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
}

.tag-hint {
  font-size: 0.65rem;
  color: oklch(55% 0.005 280);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: clamp(3.5rem, 12vw, 7rem);
  margin-bottom: 16px;
  line-height: 1;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero h2 {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #999;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  margin-bottom: 20px;
  line-height: 1.5;
}

.hero > .hero-content > p {
  font-size: 0.85rem;
  color: oklch(75% 0.005 280);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

#hello-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  padding: 12px 32px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#hello-btn:hover {
  background: var(--accent);
  color: oklch(12% 0.008 280);
  box-shadow: 0 0 30px var(--accent-glow);
}

#hello-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

#hello-btn:active {
  transform: scale(0.97);
}

/* ── About ── */
.about {
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  margin-top: -80px;
  padding: 140px 0 160px;
  background: var(--surface);
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.about-text p {
  font-size: 0.88rem;
  color: oklch(80% 0.005 280);
  margin-bottom: 16px;
  line-height: 1.8;
}

.highlight {
  color: var(--accent);
  font-weight: 500;
}

.about-blob {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-blob svg {
  width: 280px;
  height: 280px;
  filter: drop-shadow(0 0 40px var(--accent-dim));
}

/* ── Hobbies ── */
.hobbies {
  padding: 120px 0;
  position: relative;
}

.hobbies h3 {
  font-size: 2rem;
  margin-bottom: 48px;
  text-align: center;
}

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.hobby-card {
  position: relative;
  background: var(--surface);
  padding: 32px 28px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: all 0.4s;
  cursor: default;
  overflow: hidden;
}

.hobby-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 40px var(--accent-dim);
}

.hobby-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: inline-block;
  filter: grayscale(0.2);
  transition: filter 0.3s, transform 0.3s;
}

.hobby-card:hover .hobby-icon {
  filter: grayscale(0);
  transform: scale(1.1);
}

.hobby-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.hobby-card p {
  font-size: 0.78rem;
  color: oklch(75% 0.005 280);
  line-height: 1.6;
}

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  position: relative;
}

.stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
}

.stat-card {
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s;
}

.stat-card:hover::after {
  width: 80%;
}

.stat-card:hover {
  background: rgba(154, 253, 8, 0.03);
  border-color: var(--accent-dim);
}

.stat-number {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.78rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Projects / work ── */
.projects {
  padding: 120px 0;
  clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
  background: var(--surface);
  position: relative;
}

.projects h3 {
  font-size: 2rem;
  margin-bottom: 48px;
  text-align: center;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.project-item {
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: all 0.3s;
  cursor: default;
  position: relative;
}

.project-item:hover {
  border-color: var(--accent-dim);
  background: rgba(154, 253, 8, 0.02);
  transform: translateY(-2px);
}

.project-item h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.project-item p {
  font-size: 0.8rem;
  color: oklch(75% 0.005 280);
  margin-bottom: 12px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tags span {
  font-size: 0.65rem;
  padding: 3px 10px;
  border: 1px solid var(--glass-border);
  color: #888;
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.03em;
}

/* ── Blog ── */
.blog {
  padding: 120px 0;
  position: relative;
}

.blog h3 {
  font-size: 2rem;
  margin-bottom: 48px;
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(154, 253, 8, 0.08);
}

.blog-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.blog-preview {
  font-size: 0.78rem;
  color: oklch(75% 0.005 280);
  line-height: 1.6;
}

.blog-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease;
  opacity: 0;
}

.blog-card.expanded .blog-body {
  max-height: 2000px;
  opacity: 1;
}

.blog-body p {
  font-size: 0.78rem;
  color: oklch(78% 0.005 280);
  line-height: 1.8;
  margin-top: 14px;
}

.blog-body p:first-child {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.blog-subhead {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem !important;
  color: var(--accent) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 20px !important;
}

.blog-toggle {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.7rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: opacity 0.3s;
  user-select: none;
}

.blog-toggle:hover {
  opacity: 0.7;
}

.blog-card.expanded .blog-toggle::after {
  content: ' \25B2';
}

.blog-card:not(.expanded) .blog-toggle::after {
  content: ' \25BC';
}

.blog-meta {
  font-size: 0.65rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}

.blog-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.6rem;
  padding: 2px 10px;
  background: var(--accent);
  color: #000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
}

.stardance {
  border-style: dashed;
  cursor: pointer;
}

.stardance:hover {
  border-style: solid;
}

/* ── Corners ── */
.corner-zone {
  position: fixed;
  width: 100px;
  height: 100px;
  z-index: 101;
  cursor: pointer;
}

.zone-tl { top: 0; left: 0; }
.zone-tr { top: 0; right: 0; }
.zone-bl { bottom: 0; left: 0; }
.zone-br { bottom: 0; right: 0; }

.corner-panel {
  position: fixed;
  z-index: 102;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.panel-tl {
  top: 0;
  left: 0;
  transform: translate(-100%, -100%);
  border-radius: 0 0 16px 0;
  max-width: 320px;
}

.zone-tl:hover ~ .panel-tl,
.panel-tl.tapped {
  opacity: 1;
  transform: translate(0, 0);
  pointer-events: auto;
}

.panel-tr {
  top: 0;
  right: 0;
  transform: translate(100%, -100%);
  border-radius: 0 0 0 16px;
  max-width: 280px;
}

.zone-tr:hover ~ .panel-tr,
.panel-tr.tapped {
  opacity: 1;
  transform: translate(0, 0);
  pointer-events: auto;
}

.panel-bl {
  bottom: 0;
  left: 0;
  transform: translate(-100%, 100%);
  border-radius: 0 16px 0 0;
  max-width: 320px;
}

.zone-bl:hover ~ .panel-bl,
.panel-bl.tapped {
  opacity: 1;
  transform: translate(0, 0);
  pointer-events: auto;
}

.panel-br {
  bottom: 0;
  right: 0;
  transform: translate(100%, 100%);
  border-radius: 16px 0 0 0;
  max-width: 240px;
}

.zone-br:hover ~ .panel-br,
.panel-br.tapped {
  opacity: 1;
  transform: translate(0, 0);
  pointer-events: auto;
}


.term-window {
  font-size: 0.75rem;
  line-height: 1.6;
}

.term-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
}

.term-dot:nth-child(1) { background: #ff5f57; }
.term-dot:nth-child(2) { background: #ffbd2e; }
.term-dot:nth-child(3) { background: #28c840; }

.term-body .prompt {
  color: var(--accent);
}

.term-body .cmd-out { color: #aaa; }

.term-body .green { color: var(--accent); }

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.sep { height: 8px; }

.status-card {
  font-size: 0.75rem;
}

.status-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555;
  margin-bottom: 12px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.status-label { color: #777; }
.status-val { color: #ccc; }
.status-val.green { color: var(--accent); }

.dyk-card { font-size: 0.75rem; }
.dyk-badge {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 8px;
}
.dyk-text {
  color: #aaa;
  line-height: 1.5;
  transition: opacity 0.3s;
}

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.75rem;
}

.nav-link {
  color: #999;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--accent); }

.nav-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 6px 0;
}

.nav-section-label {
  font-size: 0.55rem;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
}

.nav-tagline {
  font-size: 0.6rem;
  color: #444;
  margin-top: 2px;
}

.uptime {
  margin-top: 8px;
  font-size: 0.65rem;
  color: #555;
}

#corner-count {
  color: var(--accent);
}

/* ── Keyboard hint ── */
.kb-hint {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.kb-hint:hover {
  opacity: 0.7;
}

.kb-hint kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  color: #888;
}

.kb-hint-label {
  font-size: 0.6rem;
  color: #555;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Footer ── */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--glass-border);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--accent-dim);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.78rem;
  color: oklch(70% 0.005 280);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.3s;
  padding: 8px 12px;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.footer-prompt {
  font-size: 0.82rem;
  color: oklch(65% 0.005 280);
  text-align: center;
}

.footer-prompt .cursor-blink {
  color: #444;
}

.footer-tagline {
  font-size: 0.7rem;
  color: oklch(60% 0.005 280);
  text-align: center;
  letter-spacing: 0.04em;
}

.footer-copy {
  font-size: 0.65rem;
  color: oklch(50% 0.005 280);
}

/* ── Floaters ── */
.geo-dots {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
}

.geo-dots-1 {
  top: 10%;
  right: 5%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent) 1px, transparent 1px);
  background-size: 20px 20px;
}

.geo-dots-2 {
  bottom: 10%;
  left: 3%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 15px 15px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .about-blob svg {
    width: 200px;
    height: 200px;
  }

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

  .stat-card:nth-child(1) { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
  .stat-card:nth-child(2) { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
  .stat-card:nth-child(3) { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
  .stat-card:nth-child(4) { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
}

@media (max-width: 768px) {
  header {
    padding: 12px 16px;
  }

  nav { gap: 14px; }
  nav a { font-size: 0.7rem; }

  .hero-content h1 {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .about {
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    padding: 100px 0 120px;
  }

  .hobbies {
    padding: 80px 0;
  }

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

  .hobby-card:nth-child(1),
  .hobby-card:nth-child(2),
  .hobby-card:nth-child(3),
  .hobby-card:nth-child(4),
  .hobby-card:nth-child(5) {
    clip-path: none;
    border-radius: 8px;
  }

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

  .projects {
    clip-path: polygon(0 1.5%, 100% 0, 100% 98.5%, 0 100%);
    padding: 80px 0;
  }

  .project-item:nth-child(odd),
  .project-item:nth-child(even) {
    clip-path: none;
    border-radius: 8px;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .blog {
    padding: 80px 0;
  }

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

  .blog-card:nth-child(1),
  .blog-card:nth-child(2),
  .blog-card:nth-child(3),
  .blog-card:nth-child(4) {
    clip-path: none;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 10px 12px;
  }

  nav { gap: 10px; }
  nav a { font-size: 0.6rem; }

  .logo { font-size: 1rem; }

  .hero .tag {
    font-size: 0.72rem;
    padding: 4px 12px;
  }

  .hero h2 {
    font-size: 0.9rem;
  }

  .hero > .hero-content > p {
    font-size: 0.78rem;
  }

  #hello-btn {
    font-size: 0.75rem;
    padding: 10px 24px;
  }

  .stat-number { font-size: 2rem; }
  .stat-label { font-size: 0.7rem; }

  .footer-links { gap: 14px; }
  .footer-links a { font-size: 0.7rem; }
}
