/* ================================================================
   VARIABLES & RESET
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:              #0d1117;
  --bg-card:         #161b22;
  --bg-hover:        #1c2128;
  --accent:          #00b4d8;
  --font-display:    'Space Grotesk', system-ui, sans-serif;
  --accent-soft:     rgba(0, 180, 216, 0.10);
  --accent-glow:     rgba(0, 180, 216, 0.22);
  --accent-border:   rgba(0, 180, 216, 0.35);
  --text:            #e6edf3;
  --text-muted:      #8b949e;
  --text-subtle:     #6e7681;
  --border:          #21262d;
  --border-mid:      #30363d;
  --radius:          12px;
  --radius-sm:       8px;
  --radius-pill:     999px;
  --font:            'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', monospace;
  --ease:            cubic-bezier(0.4, 0, 0.2, 1);
  --dur:             200ms;
  --shadow:          0 4px 24px rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover { color: #48cae4; }

img { max-width: 100%; display: block; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 24px 72px;
  border-bottom: 1px solid var(--border);
}

/* Animated grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(48, 54, 61, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 54, 61, 0.45) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 10%, transparent 75%);
  pointer-events: none;
}

/* Pulsing glow orb */
.hero-bg-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(0, 180, 216, 0.07) 0%, transparent 60%);
  animation: hero-glow-pulse 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes hero-glow-pulse {
  from { opacity: 0.6; transform: translateX(-50%) scale(0.92); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 52px;
}

/* Avatar */
.hero-avatar-wrap {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
}

/* Rotating conic gradient ring (pseudo-element so the image doesn't rotate) */
.hero-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent),
    rgba(0, 180, 216, 0.2) 40%,
    transparent 60%,
    rgba(0, 180, 216, 0.2) 80%,
    var(--accent)
  );
  animation: ring-spin 6s linear infinite;
  box-shadow: 0 0 32px var(--accent-glow);
}

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

.hero-avatar {
  position: relative;
  z-index: 1;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--bg);
}

/* Copy */
.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  padding: 3px 13px;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.hero-name {
  font-size: clamp(32px, 5.5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  background: linear-gradient(140deg, var(--text) 35%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn--ghost {
  color: var(--text-muted);
  border-color: var(--border-mid);
  background: transparent;
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.btn--primary {
  color: #0d1117;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.btn--primary:hover {
  background: #48cae4;
  border-color: #48cae4;
  box-shadow: 0 0 24px var(--accent-glow);
  color: #0d1117;
}

/* ================================================================
   TABS NAV
   ================================================================ */
.tabs-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}

.tabs-nav.stuck {
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

.tabs-inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-inner::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  padding: 16px 20px;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
  position: relative;
  z-index: 1;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); }

/* Sliding underline indicator — moved by JS */
.tab-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: left 0.24s var(--ease), width 0.24s var(--ease);
  pointer-events: none;
}

/* ================================================================
   MAIN / TAB PANELS
   ================================================================ */
.main {
  min-height: 55vh;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: panel-in 0.28s var(--ease) both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 52px 24px;
}

/* ================================================================
   SHARED TYPOGRAPHY
   ================================================================ */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 20px;
}

/* ================================================================
   SUMMARY TAB
   ================================================================ */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 56px;
  align-items: start;
}

.body-text {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
  max-width: 560px;
  line-height: 1.75;
}

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

/* Highlighted inline terms */
.hl {
  color: var(--text);
  font-weight: 500;
}

/* Highlight cards 2x2 grid */
.highlight-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}

.highlight-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-hover);
}

.highlight-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--accent);
  flex-shrink: 0;
}

.hl-label {
  font-size: 10.5px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 3px;
  font-family: var(--font-mono);
}

.hl-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

/* ================================================================
   SKILLS TAB
   ================================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 48px;
}

.skill-group-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-group--wide {
  grid-column: 1 / -1;
}

.skill-group-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 6px;
  color: var(--accent);
  flex-shrink: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ================================================================
   TAGS (shared across Skills, Projects, Experience)
   ================================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  transition: all var(--dur) var(--ease);
  cursor: default;
}

.tag:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.1);
}

.tag--sm {
  font-size: 11.5px;
  padding: 3px 10px;
}

.tag--cert {
  color: #d2a8ff;
  border-color: rgba(210, 168, 255, 0.3);
  background: rgba(210, 168, 255, 0.07);
}

.tag--cert:hover {
  color: #d2a8ff;
  border-color: rgba(210, 168, 255, 0.5);
  background: rgba(210, 168, 255, 0.12);
  box-shadow: 0 0 10px rgba(210, 168, 255, 0.1);
}

/* ================================================================
   PROJECTS TAB
   ================================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition:
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.project-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow), 0 0 28px var(--accent-glow);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

.status--wip {
  color: #f0883e;
  background: rgba(240, 136, 62, 0.10);
  border: 1px solid rgba(240, 136, 62, 0.28);
}

.status--shipped {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.10);
  border: 1px solid rgba(63, 185, 80, 0.28);
}

.project-ext-link {
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  transition: color var(--dur) var(--ease);
}

.project-ext-link:hover { color: var(--accent); }

.project-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.project-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

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

/* ================================================================
   EXPERIENCE TAB — TIMELINE
   ================================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Vertical connecting line */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--accent) 0%,
    rgba(0, 180, 216, 0.25) 60%,
    var(--border-mid) 100%
  );
}

.timeline-item {
  display: flex;
  gap: 28px;
  position: relative;
  padding-bottom: 36px;
}

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

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 14px var(--accent-glow);
  flex-shrink: 0;
  margin-top: 5px;
  position: relative;
  z-index: 1;
}

.timeline-dot--past {
  background: var(--border-mid);
  box-shadow: none;
  border-color: var(--bg);
}

.timeline-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color var(--dur) var(--ease);
}

.timeline-card:hover { border-color: var(--border-mid); }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.timeline-role {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.timeline-company {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-subtle);
  white-space: nowrap;
  margin-top: 4px;
  flex-shrink: 0;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.timeline-bullets li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.65;
}

.timeline-bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.45;
}

/* Project dropdowns inside timeline card */
.timeline-projects {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.project-detail {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}

.project-detail[open] {
  border-color: var(--accent-border);
}

.project-detail-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--dur) var(--ease);
}

.project-detail-summary::-webkit-details-marker { display: none; }
.project-detail-summary::marker { display: none; }

.project-detail-summary:hover {
  background: var(--accent-soft);
}

.project-detail-chevron {
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}

.project-detail[open] .project-detail-chevron {
  transform: rotate(90deg);
  color: var(--accent);
}

.project-detail-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.project-detail-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-subtle);
  white-space: nowrap;
}

.project-detail-body {
  padding: 4px 14px 14px 38px;
  margin-bottom: 0;
}

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

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer p {
  font-size: 13px;
  color: var(--text-subtle);
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover { color: var(--accent); }

/* ================================================================
   RESPONSIVE — TABLET
   ================================================================ */
@media (max-width: 780px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .hero-avatar-wrap,
  .hero-avatar { width: 120px; height: 120px; }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

/* ================================================================
   RESPONSIVE — MOBILE
   ================================================================ */
@media (max-width: 480px) {
  .hero {
    padding: 48px 16px 48px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  .tabs-inner {
    padding: 0 8px;
  }

  .tab-btn {
    padding: 14px 14px;
    font-size: 13px;
  }

  .panel-inner {
    padding: 36px 16px;
  }

  .highlight-cards {
    grid-template-columns: 1fr;
  }

  .timeline-header {
    flex-direction: column;
    gap: 6px;
  }
}

/* ================================================================
   SPACE GROTESK — display headings
   ================================================================ */
.hero-name,
.hero-badge,
.skill-group-title,
.timeline-role,
.project-title,
.section-label,
.hl-label,
.hl-value {
  font-family: var(--font-display);
}

/* ================================================================
   CURSOR — all interactive elements
   ================================================================ */
.tag,
.highlight-card,
.project-detail-summary,
.tab-btn,
.btn {
  cursor: pointer;
}

/* ================================================================
   FOCUS STATES — keyboard navigation
   ================================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.tab-btn:focus-visible {
  outline-offset: -3px;
}

/* ================================================================
   SCROLL REVEAL — elements animate in when visible
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for sibling groups */
.reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.21s; }
.reveal:nth-child(5) { transition-delay: 0.28s; }

/* ================================================================
   PREFERS-REDUCED-MOTION — respect system preference
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
