:root {
  --bg: #0a0a0a;
  --text: #FFFFFF;
  --text-secondary: #B0B0B0;
  --accent: #00D4FF;
  --accent-light: #1E3A5F;
  --card-bg: rgba(26, 26, 26, 0.4);
  --card-border: rgba(255, 255, 255, 0.1);
  --tag-bg: rgba(42, 42, 42, 0.5);
  --nav-bg: rgba(10, 10, 10, 0.7);
  --section-alt: rgba(20, 20, 20, 0.3);
  --glass-glow: rgba(0, 212, 255, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ========== NAV ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.08);
  transition: transform 0.3s ease;
}

nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

nav .nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav .nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav .nav-links a:hover { color: var(--accent); }
nav .nav-links a:hover::after { width: 100%; }

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  max-width: 780px;
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background: rgba(0, 212, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(0, 212, 255, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1.5px solid rgba(0, 212, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(0, 212, 255, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.2s forwards;
}

.scroll-hint span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--card-border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  width: 1px;
  height: 40px;
  background: var(--accent);
  animation: scrollDown 2s ease infinite;
}

/* ========== SECTIONS ========== */
section {
  padding: 7rem 2rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 3.5rem;
  line-height: 1.7;
}

/* ========== ABOUT ========== */
#about { background: var(--section-alt); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.8;
}

.about-text p strong {
  color: var(--text);
  font-weight: 500;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.detail-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px) saturate(1.5);
  -webkit-backdrop-filter: blur(10px) saturate(1.5);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem;
  transition: all 0.4s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.detail-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(0, 212, 255, 0.01));
  pointer-events: none;
}

.detail-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 212, 255, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  background: rgba(30, 58, 95, 0.15);
}

.detail-card .icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.detail-card h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.detail-card p {
  font-weight: 500;
  font-size: 0.95rem;
}

/* ========== PROJECTS ========== */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px) saturate(1.6);
  -webkit-backdrop-filter: blur(12px) saturate(1.6);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.25rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
  opacity: 0;
}

.project-card:hover::before { 
  transform: scaleX(1);
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 64px rgba(0, 212, 255, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  background: rgba(30, 58, 95, 0.2);
  border-color: rgba(0, 212, 255, 0.4);
}

.project-card .project-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.project-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.project-tags span {
  background: var(--tag-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid rgba(0, 212, 255, 0.15);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.project-tags span:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.12);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: gap 0.2s ease;
}

.project-link:hover { gap: 0.7rem; }

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.project-card.featured .project-visual {
  background: linear-gradient(135deg, var(--accent-light), var(--tag-bg));
  border-radius: 14px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0.8;
}

/* ========== EXPERIENCE ========== */
#experience { background: var(--section-alt); }

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  z-index: 1;
}

.timeline-item .date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.timeline-item h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline-item .org {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 600px;
}

/* ========== CONTACT ========== */
.contact-box {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-box .section-title {
  margin-bottom: 1rem;
}

.contact-box p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  border: 1.5px solid rgba(0, 212, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.contact-link:hover {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 212, 255, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollDown {
  0% { top: -40px; }
  100% { top: 40px; }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  nav .nav-links { display: none; }

  .hero { min-height: 90vh; padding: 5rem 1.5rem 4rem; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }

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

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

  .project-card.featured .project-visual {
    height: 180px;
  }

  section { padding: 4.5rem 1.5rem; }
}

@media (max-width: 480px) {
  .about-details { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
}