/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --color-bg: #0d0d10;
  --color-surface: #141418;
  --color-surface-2: #1e1e24;
  --color-border: #27272f;
  --color-text: #e8e8ed;
  --color-text-muted: #7a7a92;
  --color-accent: #6c63ff;
  --color-accent-hover: #857dff;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 8px;
  --radius-lg: 14px;
  --max-width: 1000px;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }

/* ===========================
   Layout
   =========================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===========================
   Header
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 16, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: 0.875rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.site-title:hover { color: var(--color-accent); }

.site-nav { display: flex; gap: 0.125rem; }

.site-nav a {
  color: var(--color-text-muted);
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  transition: all var(--transition);
}
.site-nav a:hover, .site-nav a.active {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* ===========================
   Main
   =========================== */
.site-main { flex: 1; }

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

.hero-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.10) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-avatar-wrap {
  margin-bottom: 2rem;
  position: relative;
}

.hero-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(108, 99, 255, 0.4);
  pointer-events: none;
}

.hero-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--color-accent);
}

.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(140deg, #ffffff 30%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.hero-role {
  font-size: 1.05rem;
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.hero-location {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
}

.hero-actions { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; }

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.35);
}

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  color: var(--color-text);
  border-color: rgba(108, 99, 255, 0.5);
  background: rgba(108, 99, 255, 0.08);
}

/* ===========================
   Single-Page Sections
   =========================== */
.sp-section {
  padding: 5rem 0;
}

.sp-section--alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.sp-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sp-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ===========================
   About
   =========================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  align-items: start;
}

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

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

.skills-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin-bottom: 0.875rem;
}

/* ===========================
   Tags
   =========================== */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.25);
  color: var(--color-accent-hover);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.77rem;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* ===========================
   Experience / Education Cards
   =========================== */
.xp-list { display: flex; flex-direction: column; gap: 1rem; }

.xp-card {
  display: flex;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.xp-card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.xp-card__bar {
  width: 3px;
  flex-shrink: 0;
  background: var(--color-accent);
  border-radius: 0;
}

.xp-card__body {
  padding: 1.5rem 1.75rem;
  flex: 1;
}

.xp-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.xp-card__role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.xp-card__org {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.xp-card__date {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--color-accent);
  white-space: nowrap;
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  flex-shrink: 0;
}

.xp-card__location {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 0.6rem;
}

/* ===========================
   Photo Gallery
   =========================== */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.photo-gallery figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.photo-gallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.photo-gallery figure:hover img {
  transform: scale(1.04);
}

/* ===========================
   Contact
   =========================== */
.contact-block {
  max-width: 520px;
}

.contact-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.contact-text {
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
  font-size: 1rem;
}

/* ===========================
   Single Post / Page
   =========================== */
.single-post { max-width: 720px; margin: 3rem auto; }

.post-header { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--color-border); }
.post-header h1 { margin-bottom: 0.75rem; }

.post-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.post-content { line-height: 1.85; }
.post-content h2 { margin: 2.5rem 0 1rem; font-size: 1.5rem; }
.post-content h3 { margin: 2rem 0 0.75rem; font-size: 1.2rem; }
.post-content p { margin-bottom: 1.25rem; color: var(--color-text-muted); }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.4rem; color: var(--color-text-muted); }
.post-content code {
  font-family: var(--font-mono);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
}
.post-content pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.post-content pre code { background: none; border: none; padding: 0; font-size: 0.88rem; }
.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ===========================
   List Page
   =========================== */
.list-page { margin: 3rem 0; }
.list-page h1 { margin-bottom: 0.5rem; }
.section-intro { color: var(--color-text-muted); margin-bottom: 2rem; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
}
.post-card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.post-card h2 a, .post-card h3 a { color: var(--color-text); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--color-accent); }
.post-card p { color: var(--color-text-muted); font-size: 0.93rem; margin-top: 0.5rem; }

time { font-size: 0.82rem; color: var(--color-text-muted); display: block; margin-bottom: 0.4rem; font-family: var(--font-mono); }

/* ===========================
   Footer
   =========================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.75rem 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer p { color: var(--color-text-muted); font-size: 0.85rem; }
.social-links { display: flex; gap: 1rem; }
.social-links a { color: var(--color-text-muted); font-size: 0.85rem; }
.social-links a:hover { color: var(--color-accent); }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .photo-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header .container { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .site-nav { flex-wrap: wrap; }
  .hero { padding: 4rem 1.5rem; min-height: auto; }
  .sp-section { padding: 3.5rem 0; }
  .xp-card__top { flex-direction: column; gap: 0.5rem; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}
