:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #18181b;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222225;
  --accent: #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: #27272a;
  --border-accent: rgba(59, 130, 246, 0.3);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1120px;
  --nav-height: 64px;
  --section-pad: 120px 0;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== NAV ========== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: border-color 0.3s;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
}

.nav-links a {
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ========== SECTIONS ========== */
section { padding: var(--section-pad); position: relative; }

#about, #experience, #projects, #resume { background: var(--bg-secondary); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
  line-height: 1.2;
}

/* ========== HERO ========== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 25%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-text { flex: 1; }

.hero-text .greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-light);
  margin-bottom: 12px;
  display: block;
}

.hero-text h1 {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
}

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

.hero-text .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 400;
}

.hero-text .location {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover { background: var(--accent-dark); transform: translateY(-2px); }

.hero-image {
  flex-shrink: 0;
  position: relative;
}

.hero-image img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-accent);
  position: relative;
  z-index: 1;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(var(--accent), transparent, var(--accent), transparent, var(--accent));
  animation: spin 6s linear infinite;
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), black calc(100% - 1px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), black calc(100% - 1px));
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========== ABOUT ========== */
#about .container { position: relative; z-index: 1; }

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

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

.about-text p:last-child { margin-bottom: 0; }

.about-details {
  display: grid;
  gap: 20px;
}

.about-detail-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}

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

.about-detail-item .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.about-detail-item .value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* ========== EDUCATION ========== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--border), var(--accent), var(--border));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible { opacity: 1; transform: translateY(0); }

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

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  z-index: 1;
  transition: box-shadow 0.3s;
}

.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.timeline-card:hover {
  border-color: var(--border-accent);
  transform: translateX(4px);
}

.timeline-card .date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-light);
  margin-bottom: 6px;
}

.timeline-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-card .meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.timeline-card .gpa {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-light);
}

.timeline-card-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.timeline-card-content .logo {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-top: 2px;
}

.timeline-card-content .text { flex: 1; }

/* ========== EXPERIENCE ========== */
.experience-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(30px);
}

.exp-card.visible { opacity: 1; transform: translateY(0); }

.exp-card:hover { border-color: var(--border-accent); }

.exp-card.featured {
  border-color: var(--border-accent);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.exp-card .exp-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.exp-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.exp-card .exp-company {
  color: var(--accent-light);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.exp-card .exp-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.exp-card.secondary {
  padding: 24px 28px;
}

.exp-card.secondary h3 { font-size: 1.1rem; }

.exp-card.secondary p { font-size: 0.85rem; }

.exp-card .exp-logo {
  height: 80px;
  width: auto;
  margin-bottom: 12px;
  object-fit: contain;
  display: block;
}

/* ========== SKILLS ========== */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

.skill-badge {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

.skill-badge:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ========== PROJECTS ========== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  opacity: 0;
  transform: translateY(30px);
}

.project-card.visible { opacity: 1; transform: translateY(0); }

.project-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.project-card .project-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.project-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

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

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

.project-tags span {
  padding: 3px 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-light);
}

/* ========== CERTIFICATIONS ========== */
.certs-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  min-width: 220px;
  flex: 1;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: border-color 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(20px);
}

.cert-card.visible { opacity: 1; transform: translateY(0); }

.cert-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.cert-card .cert-logo {
  width: 100%;
  height: 240px;
  object-fit: contain;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 28px;
}

.cert-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cert-card .cert-issuer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cert-card .cert-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-light);
}

/* ========== RESUME ========== */
.resume-wrapper {
  text-align: center;
}

.resume-viewer {
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: 20px;
}

.resume-viewer embed {
  width: 100%;
  height: 100%;
  border: none;
}

.resume-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s;
}

.resume-download:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* ========== CONTACT ========== */
#contact .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-links {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.contact-links a:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.contact-links svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-secondary);
  transition: stroke 0.2s;
}

.contact-links a:hover svg { stroke: var(--accent); }

.contact-email {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.contact-email:hover { color: var(--accent-light); }

.contact-location {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ========== SECTION TRANSITIONS ========== */
#about      { position: relative; }
#about::before {
  content: '';
  position: absolute;
  top: -40px; left: 0; right: 0;
  height: 80px;
  background: var(--bg-primary);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
}

#skills     { position: relative; }
#skills::before {
  content: '';
  position: absolute;
  top: -1px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

#certifications { position: relative; }
#certifications::before {
  content: '';
  position: absolute;
  top: -40px; left: 0; right: 0;
  height: 80px;
  background: var(--bg-secondary);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
}

/* ========== ANIMATIONS ========== */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-content { flex-direction: column-reverse; text-align: center; gap: 32px; }
  .hero-text h1 { font-size: 3rem; }
  .hero-text .location { justify-content: center; }
  .hero-image img { width: 200px; height: 200px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .experience-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 2rem; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 12px; gap: 4px; }
  .nav-toggle { display: flex; }
  .timeline-card { padding: 18px 20px; }
  .certs-grid { flex-direction: column; align-items: center; }
  .cert-card { max-width: 100%; width: 100%; }
  .exp-card.featured { padding: 24px; }
  .exp-card.secondary { padding: 20px 24px; }
  .resume-viewer { height: 450px; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 2.2rem; }
  .hero-image img { width: 160px; height: 160px; }
  .section-title { font-size: 1.65rem; margin-bottom: 32px; }
  section { padding: 80px 0; }
  .projects-grid { gap: 14px; }
  .project-card { padding: 20px; }
  .contact-links a { width: 48px; height: 48px; }
  .contact-links svg { width: 20px; height: 20px; }
  .resume-viewer { height: 350px; }
}
