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

:root {
  --bg: #0a0a0a;
  --surface: rgba(255,255,255,0.02);
  --surface-hover: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.05);
  --border-hover: rgba(255,255,255,0.1);
  --text: rgba(255,255,255,0.85);
  --text-muted: rgba(255,255,255,0.4);
  --text-dim: rgba(255,255,255,0.25);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(255,255,255,0.15); color: #fff; }

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

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all 0.5s;
}
nav.scrolled {
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.8); text-decoration: none;
  transition: color 0.3s;
}
.logo:hover { color: #fff; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  font-size: 14px; color: rgba(255,255,255,0.5); text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: #fff; }

/* Hero */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; padding: 80px 24px 0; overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute; top: 33%; left: 50%; transform: translate(-50%,-50%);
  width: 600px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,0.02); filter: blur(120px); pointer-events: none;
}
.hero-content { position: relative; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.05);
  border-radius: 999px; padding: 6px 12px; font-size: 12px;
  color: rgba(255,255,255,0.5); margin-bottom: 32px;
}
.hero-label {
  font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em; margin-bottom: 12px;
}
.hero-name {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(3rem, 8vw, 7rem); line-height: 1; letter-spacing: -0.02em;
  color: #fff; margin-bottom: 24px; min-height: 1.1em;
}
.hero-tagline {
  max-width: 560px; font-size: 16px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 40px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: #000; border: none; border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: background 0.3s;
}
.btn-primary:hover { background: rgba(255,255,255,0.9); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: rgba(255,255,255,0.7);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: all 0.3s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.2); color: #fff; }

.hero-social {
  margin-top: 64px; display: flex; gap: 4px;
}
.hero-social a {
  padding: 8px; color: rgba(255,255,255,0.2); transition: color 0.3s;
}
.hero-social a:hover { color: rgba(255,255,255,0.6); }

.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.scroll-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
  animation: pulse-line 2s ease-in-out infinite;
}
@keyframes pulse-line { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* Sections */
.section { padding: 128px 0; }
.section-border { border-top: 1px solid var(--border); }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 64px;
}
.section-label {
  font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.3);
  letter-spacing: 0.15em; margin-bottom: 12px;
}
.section-title { font-size: 30px; font-weight: 500; color: #fff; letter-spacing: -0.02em; }
.section-count { font-family: var(--mono); font-size: 14px; color: rgba(255,255,255,0.3); }

/* Projects Grid */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.project-card {
  position: relative; overflow: hidden; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: all 0.5s;
}
.project-card:hover {
  border-color: var(--border-hover); background: var(--surface-hover);
  transform: translateY(-4px);
}

.project-img {
  position: relative; overflow: hidden; height: 208px; transition: height 0.5s;
}
.project-card.expanded .project-img { height: 288px; }
.project-img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.6; transition: all 0.7s;
}
.project-card:hover .project-img img { transform: scale(1.05); opacity: 0.8; }
.project-card.expanded .project-img img { opacity: 0.8; }

.project-year {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  padding: 4px 8px; border-radius: 2px;
}
.project-role {
  position: absolute; bottom: 16px; left: 16px;
  font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.5);
}

.project-body { padding: 24px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); background: rgba(255,255,255,0.05);
  border-radius: 2px; padding: 2px 8px;
  font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.5);
  transition: all 0.3s;
}
.tag:hover { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.7); }

.project-title {
  font-size: 16px; font-weight: 500; color: #fff; margin-bottom: 4px;
  transition: color 0.3s;
}
.project-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.project-desc {
  font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.6;
  transition: all 0.5s;
}
.project-desc.clamped {
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.project-toggle {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.3);
}
.project-toggle svg { transition: transform 0.3s; }
.project-card.expanded .project-toggle svg { transform: rotate(90deg); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.about-heading {
  font-size: 28px; font-weight: 500; color: #fff; line-height: 1.3; margin-bottom: 24px;
}
.text-muted { color: var(--text-muted); }
.about-text { display: flex; flex-direction: column; gap: 16px; }
.about-text p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.6; }
.languages { margin-top: 32px; display: flex; gap: 24px; }
.lang-label { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.3); }
.lang-level { font-size: 14px; color: rgba(255,255,255,0.6); font-weight: 500; }

.about-right { display: flex; flex-direction: column; gap: 40px; }
.block-label {
  font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.25);
  letter-spacing: 0.15em; margin-bottom: 16px;
}
.skills-block { display: flex; flex-direction: column; gap: 0; }
.skills-group { margin-bottom: 16px; }
.group-label { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.3); margin-bottom: 8px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 20px; }
.timeline-item {
  position: relative; padding-left: 16px;
  border-left: 1px solid var(--border);
}
.timeline-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 4px;
}
.timeline-role { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.8); }
.timeline-meta { font-size: 12px; color: var(--text-muted); }
.timeline-period {
  flex-shrink: 0; font-family: var(--mono); font-size: 11px; color: var(--text-dim);
}
.timeline-desc { font-size: 12px; color: rgba(255,255,255,0.35); line-height: 1.5; }

/* Contact */
.contact { text-align: center; }
.contact-inner { max-width: 640px; }
.contact-heading {
  font-size: 36px; font-weight: 500; color: #fff; letter-spacing: -0.02em; margin-bottom: 16px;
}
.contact-text {
  font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 40px;
}
.contact-phone {
  margin-top: 24px; font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.2);
}

/* Footer */
footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,0.2);
}

/* Noise overlay */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* Responsive */
@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .section { padding: 80px 0; }
  .section-count { display: none; }
  .timeline-top { flex-direction: column; gap: 2px; }
  .timeline-period { margin-top: 2px; }
  .hero-name { font-size: clamp(2.5rem, 10vw, 5rem); }
}
