:root {
  --bg: #090a0c;
  --text: #f4f5f7;
  --muted: #aeb3bd;
  --subtle: #707680;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #aebcff;
  --accent-soft: rgba(174, 188, 255, 0.12);
  --success: #7df2a8;

  --mouse-x: 50%;
  --mouse-y: 50%;
  --grid-size: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;

  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* =========================================================
   BACKGROUND
========================================================= */

.background {
  position: fixed;
  inset: 0;
  z-index: 0;

  pointer-events: none;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(174, 188, 255, 0.025),
      transparent 45%
    ),
    var(--bg);
}

.grid {
  position: absolute;
  inset: -1px;

  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);

  background-size:
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size);

  opacity: 0.72;

  mask-image: radial-gradient(
    ellipse 90% 85% at center,
    black 20%,
    rgba(0, 0, 0, 0.8) 55%,
    transparent 100%
  );

  -webkit-mask-image: radial-gradient(
    ellipse 90% 85% at center,
    black 20%,
    rgba(0, 0, 0, 0.8) 55%,
    transparent 100%
  );
}

.grid::after {
  content: "";

  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle 240px at var(--mouse-x) var(--mouse-y),
    rgba(174, 188, 255, 0.085),
    rgba(174, 188, 255, 0.025) 38%,
    transparent 72%
  );
}

.cursor-light {
  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle 420px at var(--mouse-x) var(--mouse-y),
    rgba(174, 188, 255, 0.065),
    transparent 70%
  );
}

.orb {
  position: absolute;

  width: 420px;
  height: 420px;

  top: 8%;
  right: -160px;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(174, 188, 255, 0.055),
    transparent 68%
  );

  filter: blur(20px);

  animation: floatOrb 12s ease-in-out infinite;
}

/* =========================================================
   LAYOUT
========================================================= */

.page {
  position: relative;
  z-index: 1;

  width: 100%;
  height: 100dvh;
}

.container {
  width: 100%;
  max-width: 1440px;
  height: 100%;

  margin: 0 auto;

  display: flex;
  flex-direction: column;

  padding: 32px 42px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--subtle);
  font-weight: 400;
}

/* =========================================================
   NAVIGATION
========================================================= */

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;

  color: var(--muted);

  font-size: 13px;
  letter-spacing: 0.02em;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.nav-link::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: -5px;

  height: 1px;

  background: var(--accent);

  transform: scaleX(0);
  transform-origin: right;

  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-button {
  appearance: none;
  -webkit-appearance: none;

  margin: 0;
  padding: 0;

  border: 0;
  outline: 0;

  background: transparent;

  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;

  cursor: pointer;
}

/* =========================================================
   HERO
========================================================= */

main {
  flex: 1;

  display: flex;
  align-items: center;
}

.hero {
  width: 100%;
}

.eyebrow {
  margin-bottom: 24px;

  display: flex;
  align-items: center;
  gap: 10px;

  color: var(--subtle);

  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  opacity: 0;

  animation: fadeUp 0.7s ease forwards;

  animation-delay: 0.05s;
}

.eyebrow::before {
  content: "";

  width: 22px;
  height: 1px;

  background: var(--accent);
}

h1 {
  margin: 0;

  font-size: clamp(56px, 9vw, 112px);

  line-height: 1.02;

  font-weight: 600;
  letter-spacing: -0.055em;
}

.line {
  display: block;
  overflow: hidden;
}

.line + .line {
  margin-top: 8px;
}

.line-inner {
  display: inline-block;

  opacity: 0;

  transform: translateY(110%);

  animation: lineReveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.line:nth-child(1) .line-inner {
  animation-delay: 0.12s;
}

.line:nth-child(2) .line-inner {
  animation-delay: 0.2s;
}

/* =========================================================
   TEXT OUTLINE
========================================================= */

.outline {
  color: transparent;

  -webkit-text-stroke: 1.2px rgba(244, 245, 247, 0.75);

  letter-spacing: -0.025em;

  transition:
    color 0.35s ease,
    -webkit-text-stroke-color 0.35s ease;
}

h1:hover .outline {
  color: var(--accent);

  -webkit-text-stroke-color: var(--accent);
}

.dot {
  color: var(--accent);
}

.description {
  max-width: 520px;

  margin-top: 34px;

  color: var(--muted);

  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;

  opacity: 0;

  animation: fadeUp 0.8s ease forwards;

  animation-delay: 0.48s;
}

/* =========================================================
   ACTIONS
========================================================= */

.actions {
  display: flex;
  align-items: center;

  gap: 12px;

  margin-top: 30px;

  opacity: 0;

  animation: fadeUp 0.8s ease forwards;

  animation-delay: 0.58s;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 112px;
  height: 44px;

  padding: 0 18px;

  border: 1px solid var(--border);

  border-radius: 999px;

  font-size: 13px;
  letter-spacing: 0.01em;

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

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

  border-color: rgba(174, 188, 255, 0.35);
}

.button.primary {
  background: var(--text);
  color: var(--bg);

  border-color: var(--text);
}

.button.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button.secondary {
  color: var(--muted);

  background: rgba(255, 255, 255, 0.025);
}

.button.secondary:hover {
  color: var(--text);

  background: var(--accent-soft);
}

/* =========================================================
   FOOTER
========================================================= */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  color: var(--subtle);

  font-size: 11px;
  letter-spacing: 0.03em;
}

.footer-status {
  display: flex;
  align-items: center;

  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: var(--success);

  box-shadow: 0 0 0 4px rgba(125, 242, 168, 0.07);

  animation: pulse 2.5s ease-in-out infinite;
}

.footer-right {
  display: flex;
  align-items: center;

  gap: 18px;
}

#localTime {
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   EXPERIENCE OVERLAY
========================================================= */

.experience-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;

  display: flex;
  justify-content: flex-end;

  padding: 0;

  background: rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.experience-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* =========================================================
   EXPERIENCE PANEL
========================================================= */

.experience-panel {
  width: min(620px, 100%);
  height: 100dvh;

  padding: 0;

  overflow-y: auto;

  overscroll-behavior: contain;

  border-left: 1px solid var(--border);

  background: linear-gradient(
    180deg,
    rgba(18, 19, 23, 0.98),
    rgba(9, 10, 12, 0.98)
  );

  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.35);

  transform: translateX(100%);

  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);

  scrollbar-width: thin;

  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.experience-overlay.open .experience-panel {
  transform: translateX(0);
}

/* =========================================================
   EXPERIENCE HEADER
========================================================= */

.experience-header {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  padding: 42px 42px 28px;

  border-bottom: 1px solid var(--border);

  background: rgba(18, 19, 23, 0.94);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  transition:
    padding 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease;
}

.experience-header-copy {
  min-width: 0;
}

.experience-label {
  max-height: 20px;

  overflow: hidden;

  margin-bottom: 10px;

  color: var(--subtle);

  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;

  transition:
    opacity 0.25s ease,
    max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.experience-header h2 {
  margin: 0;

  color: var(--text);

  font-size: 28px;
  line-height: 1.2;
  font-weight: 500;

  letter-spacing: -0.03em;
}

.experience-close {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  margin-left: 24px;

  border: 1px solid var(--border);

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.025);

  color: var(--muted);

  font-family: inherit;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;

  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.experience-close:hover {
  color: var(--text);

  background: var(--accent-soft);

  border-color: rgba(174, 188, 255, 0.3);

  transform: rotate(90deg);
}

/* =========================================================
   EXPERIENCE HEADER COLLAPSE
========================================================= */

.experience-header.is-collapsed {
  align-items: center;

  padding-top: 22px;
  padding-bottom: 22px;
}

.experience-header.is-collapsed .experience-label {
  max-height: 0;

  margin-bottom: 0;

  opacity: 0;

  transform: translateY(-6px);
}

.experience-header.is-collapsed h2 {
  line-height: 1;
}

/* =========================================================
   EXPERIENCE PROGRESS
========================================================= */

.experience-progress {
  position: absolute;

  left: 0;
  right: 0;
  bottom: -1px;

  height: 2px;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.035);
}

.experience-progress-bar {
  width: 100%;
  height: 100%;

  background: var(--accent);

  transform: scaleX(0);

  transform-origin: left center;

  transition: transform 0.08s linear;

  box-shadow: 0 0 10px rgba(174, 188, 255, 0.35);

  will-change: transform;
}

/* =========================================================
   EXPERIENCE CONTENT
========================================================= */

.experience-content {
  padding: 42px;
}

.experience-section + .experience-section {
  margin-top: 48px;
}

.experience-learning + .experience-section,
.experience-project + .experience-section {
  margin-top: 48px;
}

.experience-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 12px;

  color: var(--subtle);

  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.experience-section h3 {
  margin: 0;

  color: var(--text);

  font-size: 19px;
  line-height: 1.4;
  font-weight: 500;

  letter-spacing: -0.015em;
}

.experience-section > p {
  max-width: 520px;

  margin: 12px 0 0;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.75;
}

/* =========================================================
   EXPERIENCE PROJECT
========================================================= */

.experience-project {
  margin-top: 28px;

  padding: 20px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.018);
}

.experience-project + .experience-project {
  margin-top: 14px;
}

.experience-project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;
}

.experience-project-header .section-label {
  margin-bottom: 8px;

  color: var(--accent);
}

.experience-project h3 {
  margin: 0;

  color: var(--text);

  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;

  letter-spacing: -0.01em;
}

.experience-project > p {
  margin: 12px 0 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.7;
}

.experience-project .experience-tags {
  margin-top: 16px;
}

/* =========================================================
   CURRENTLY LEARNING
========================================================= */

.experience-learning {
  margin-top: 18px;

  padding: 18px 20px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: rgba(174, 188, 255, 0.035);
}

.experience-learning .section-label {
  margin-bottom: 10px;

  color: var(--accent);
}

.experience-learning p {
  margin: 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.7;
}

.experience-learning .experience-tags {
  margin-top: 14px;
}

/* =========================================================
   EXPERIENCE TAGS
========================================================= */

.experience-tags {
  display: flex;
  flex-wrap: wrap;

  gap: 7px;

  margin-top: 20px;
}

.experience-tags span {
  padding: 6px 9px;

  border: 1px solid var(--border);

  border-radius: 5px;

  background: rgba(255, 255, 255, 0.02);

  color: var(--subtle);

  font-size: 10px;
  letter-spacing: 0.02em;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.experience-tags span:hover {
  color: var(--text);

  border-color: rgba(174, 188, 255, 0.25);

  background: var(--accent-soft);
}

/* =========================================================
   PROJECTS
========================================================= */

.projects-section {
  margin-top: 52px;
}

.section-label {
  margin-bottom: 18px;

  color: var(--subtle);

  font-size: 11px;
  letter-spacing: 0.14em;
}

.project-list {
  border-top: 1px solid var(--border);
}

.project-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 24px;

  padding: 20px 0;

  border-bottom: 1px solid var(--border);

  transition:
    padding 0.25s ease,
    background 0.25s ease;
}

.project-item:hover {
  padding-left: 8px;
  padding-right: 8px;
}

.project-item h3 {
  margin: 0;

  font-size: 15px;
}

.project-item p {
  max-width: 430px;

  margin: 7px 0 0;

  color: var(--subtle);

  font-size: 12px;
  line-height: 1.6;
}

.project-year {
  flex-shrink: 0;

  color: var(--subtle);

  font-size: 10px;
  letter-spacing: 0.05em;
}

/* =========================================================
   EXPERIENCE SCROLLBAR
========================================================= */

.experience-panel::-webkit-scrollbar {
  width: 5px;
}

.experience-panel::-webkit-scrollbar-track {
  background: transparent;
}

.experience-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);

  border-radius: 999px;
}

/* =========================================================
   KEYBOARD FOCUS
========================================================= */

.experience-close:focus-visible,
.nav-link:focus-visible,
.button:focus-visible,
.command-item:focus-visible {
  outline: 2px solid var(--accent);

  outline-offset: 4px;
}

.experience-panel:focus {
  outline: none;
}

/* =========================================================
   COMMAND PALETTE
========================================================= */

.command-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  padding-top: 15vh;

  background: rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.command-overlay.open {
  opacity: 1;
  visibility: visible;
}

.command {
  width: min(560px, calc(100vw - 32px));

  overflow: hidden;

  border: 1px solid var(--border);

  border-radius: 14px;

  background: rgba(14, 15, 18, 0.96);

  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);

  transform: translateY(-10px) scale(0.98);

  transition: transform 0.2s ease;
}

.command-overlay.open .command {
  transform: translateY(0) scale(1);
}

.command-search {
  width: 100%;

  padding: 18px 20px;

  border: 0;
  border-bottom: 1px solid var(--border);

  outline: 0;

  background: transparent;
  color: var(--text);

  font: inherit;
  font-size: 14px;
}

.command-search::placeholder {
  color: var(--subtle);
}

.command-list {
  padding: 8px;
}

.command-item {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 13px;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: var(--muted);

  text-align: left;

  font: inherit;
  font-size: 13px;

  cursor: pointer;
}

.command-item:hover,
.command-item.selected,
.command-item.active {
  background: rgba(174, 188, 255, 0.08);

  color: var(--text);
}

.command-key {
  color: var(--subtle);
  font-size: 11px;
}

/* =========================================================
   CURSOR TRAIL
========================================================= */

.cursor-trail {
  position: fixed;

  left: 0;
  top: 0;

  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: rgba(174, 188, 255, 0.5);

  pointer-events: none;

  z-index: 9999;

  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);

  opacity: 0;

  filter: blur(0.5px);

  will-change: transform, opacity;

  transition: opacity 0.25s ease;
}

/* =========================================================
   DEV MODE
========================================================= */

.dev-mode {
  position: fixed;

  right: 24px;
  bottom: 24px;

  z-index: 20;

  width: 260px;

  padding: 14px 16px;

  border: 1px solid rgba(174, 188, 255, 0.18);

  border-radius: 10px;

  background: rgba(9, 10, 12, 0.82);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  font-size: 11px;
  line-height: 1.7;

  color: var(--muted);

  opacity: 0;

  transform: translateY(10px);

  pointer-events: none;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.dev-mode.visible,
.dev-mode.open {
  opacity: 1;

  transform: translateY(0);
}

.dev-mode-title {
  color: var(--text);

  margin-bottom: 6px;
}

.dev-mode-row {
  display: flex;
  justify-content: space-between;

  gap: 20px;
}

.dev-mode-value {
  color: var(--accent);
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes lineReveal {
  from {
    opacity: 0;

    transform: translateY(110%);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;

    transform: translateY(12px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-30px, 24px, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {
  :root {
    --grid-size: 52px;
  }

  .container {
    padding: 24px 22px;
  }

  .nav {
    gap: 18px;
  }

  .nav-link {
    font-size: 12px;
  }

  h1 {
    font-size: clamp(52px, 16vw, 82px);

    line-height: 1.04;
  }

  .line + .line {
    margin-top: 6px;
  }

  .description {
    max-width: 440px;

    margin-top: 26px;

    font-size: 14px;
    line-height: 1.7;
  }

  .actions {
    margin-top: 24px;
  }

  .button {
    min-width: 104px;
    height: 42px;
  }

  footer {
    font-size: 10px;
  }

  .footer-right {
    gap: 10px;
  }

  .experience-panel {
    width: 100%;
    height: 100dvh;

    padding: 0;
  }

  .experience-header {
    top: 0;

    padding: calc(22px + env(safe-area-inset-top)) 22px 20px;

    background: rgba(18, 19, 23, 0.94);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);
  }

  .experience-header.is-collapsed {
    align-items: center;

    padding: calc(14px + env(safe-area-inset-top)) 22px 14px;
  }

  .experience-header h2 {
    font-size: 24px;
  }

  .experience-header.is-collapsed h2 {
    line-height: 1;
  }

  .experience-close {
    width: 40px;
    height: 40px;

    margin-left: 18px;

    font-size: 22px;
  }

  .experience-content {
    padding: 32px 22px calc(32px + env(safe-area-inset-bottom));
  }

  .experience-meta {
    align-items: flex-start;
    flex-direction: column;

    gap: 5px;
  }

  .experience-project {
    padding: 18px 16px;
  }

  .experience-project-header {
    flex-direction: column;

    gap: 8px;
  }

  .experience-learning {
    padding: 16px;
  }

  .project-item {
    gap: 12px;
  }

  .project-item p {
    font-size: 11px;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {
  .logo {
    font-size: 13px;
  }

  .nav {
    gap: 14px;
  }

  .nav-link {
    font-size: 11px;
  }

  .footer-status span {
    display: none;
  }

  .experience-header h2 {
    font-size: 22px;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }

  .cursor-trail {
    display: none;
  }

  .dev-mode {
    transition: none;
  }

  .experience-overlay,
  .experience-panel,
  .experience-close {
    transition: none;
  }

  .experience-progress-bar {
    transition: none;
  }
}
