@font-face {
  font-family: 'Georgia';
  src: url('georgia.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #0A0A0A;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --text: #E8E8E8;
  --text-muted: #777777;
  --text-dim: #444444;
  --border: #1E1E1E;
  --border-light: #2A2A2A;
  --accent: #00FF88;
  --accent-dim: rgba(0, 255, 136, 0.1);
  --font-mono: Georgia, 'Times New Roman', serif;
  --font-sans: Georgia, 'Times New Roman', serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

#trailCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

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

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

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

.music-btn {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.music-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.music-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}

.music-player {
  position: fixed;
  top: 4rem;
  right: 3rem;
  z-index: 99;
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 136, 0.05);
}

.music-player.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.music-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0, 255, 136, 0.06), transparent);
}

.music-player-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq-bars span {
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: eq 0.9s ease-in-out infinite;
}

.eq-bars span:nth-child(1) { animation-delay: 0s; }
.eq-bars span:nth-child(2) { animation-delay: 0.2s; }
.eq-bars span:nth-child(3) { animation-delay: 0.4s; }

@keyframes eq {
  0%, 100% { height: 3px; }
  50% { height: 12px; }
}

.music-player-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.music-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.music-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.music-player-embed {
  padding: 0.5rem;
}

.music-player iframe {
  display: block;
  border: none;
  border-radius: 8px;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 3rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-content {
  width: 100%;
  max-width: 700px;
  min-width: 0;
  position: relative;
}

.hero-pfp {
  position: absolute;
  top: 0;
  right: -5rem;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  object-fit: cover;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-lg);
  min-height: 1.2em;
}

.typing-text {
  display: inline;
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
  font-weight: 400;
  display: inline-block;
  width: 0.55em;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: var(--space-xl);
}

.hero-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.link-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: border-color 0.2s ease;
}

.link-label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}

.link-arrow {
  font-size: 1.1rem;
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.2s ease;
}

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

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

.link-item:hover .link-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: var(--space-sm);
}

.about {
  padding: var(--space-3xl) 3rem;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-3xl);
}

.about-left h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-top: var(--space-xs);
}

.about-right p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.about-details {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.detail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-value {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: right;
}

.work {
  padding: var(--space-3xl) 3rem;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.work-header {
  margin-bottom: var(--space-xl);
}

.work-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-top: var(--space-xs);
}

.project-list {
  display: flex;
  flex-direction: column;
}

.project {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}

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

.project-top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: 0.75rem;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  background: var(--accent-dim);
  border-radius: 2px;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.project h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.project p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: var(--space-sm);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: 2px;
}

.links {
  padding: var(--space-3xl) 3rem;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.links-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-3xl);
}

.links-left h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-top: var(--space-xs);
}

.links-right {
  display: flex;
  flex-direction: column;
}

.external-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s ease;
}

.external-link:first-child {
  border-top: 1px solid var(--border);
}

.external-link:hover {
  padding-left: 0.75rem;
}

.link-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.link-name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.link-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.link-arrow-lg {
  font-size: 1.25rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.external-link:hover .link-arrow-lg {
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

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

.footer-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 6rem;
  font-weight: 600;
  color: var(--border-light);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 360px;
}

.error-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s ease;
}

.error-link:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .music-player {
    right: 1.5rem;
    left: 1.5rem;
    width: auto;
  }

  .hero,
  .about,
  .work,
  .links,
  footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-pfp {
    width: 60px;
    height: 60px;
  }

  .about-grid,
  .links-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about-left h2,
  .work-header h2,
  .links-left h2 {
    font-size: 2rem;
  }

  .detail {
    flex-direction: column;
    gap: 0.25rem;
  }

  .detail-value {
    text-align: left;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
