/* ============================================================
   CSS VARIABLES — Dark modern theme
   ============================================================ */
:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #21262d;
  --border:    #30363d;
  --accent:    #58a6ff;
  --accent2:   #79c0ff;
  --green:     #3fb950;
  --text:      #e6edf3;
  --text-muted:#8b949e;
  --text-dim:  #6e7681;
  --radius:    8px;
  --radius-lg: 14px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --transition:0.2s ease;
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --nav-h:     64px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-content {
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 80px;
  min-height: 100vh;
}
.section { padding: 64px 0; }
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--text); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface2);
}
.nav-btn {
  background: var(--accent);
  color: #0d1117;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--transition), opacity var(--transition);
}
.nav-btn:hover { background: var(--accent2); color: #0d1117; }

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown > a { cursor: pointer; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  padding: 6px 0;
  box-shadow: var(--shadow);
  z-index: 200;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition), background var(--transition);
}
.dropdown li a:hover {
  color: var(--text);
  background: var(--surface2);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--nav-h) 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(88,166,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 400;
}
.hero-title span { color: var(--accent); }
.hero-bio {
  max-width: 600px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
  font-size: 1.0rem;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover { background: var(--accent2); color: #0d1117; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ============================================================
   SKILLS BADGES
   ============================================================ */
.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 48px 0;
}
.skill-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
}
.skill-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(88,166,255,0.08);
}

/* ============================================================
   CARDS GRID
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(88,166,255,0.1);
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }
.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}
.card-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.card-link:hover { color: var(--accent2); }
.card-level {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.level-expert   { background: rgba(63,185,80,0.15);  color: var(--green); border: 1px solid rgba(63,185,80,0.3); }
.level-advanced { background: rgba(88,166,255,0.12); color: var(--accent); border: 1px solid rgba(88,166,255,0.3); }
.level-intermediate { background: rgba(139,148,158,0.12); color: var(--text-muted); border: 1px solid var(--border); }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  padding: calc(var(--nav-h) + 48px) 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.page-hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.page-hero p {
  color: var(--text-muted);
  max-width: 600px;
  font-size: 1.05rem;
}

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}
.detail-body p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 1.0rem;
}
.detail-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 10px;
}
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 6px 0;
  transition: color var(--transition);
}
.sidebar-links a:hover { color: var(--accent); }

/* ============================================================
   WORK TIMELINE
   ============================================================ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-period {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 4px;
}
.timeline-role {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.timeline-company {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.timeline-points {
  list-style: none;
  padding: 0;
}
.timeline-points li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0 4px 16px;
  position: relative;
  line-height: 1.6;
}
.timeline-points li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 5px;
}

/* ============================================================
   CV PAGE
   ============================================================ */
.cv-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.cv-section { margin-bottom: 48px; }
.cv-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.cv-sidebar-section { margin-bottom: 32px; }
.cv-sidebar-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 12px;
}
.cv-edu-item { margin-bottom: 16px; }
.cv-edu-degree { font-weight: 600; font-size: 0.95rem; }
.cv-edu-school { color: var(--text-muted); font-size: 0.875rem; }
.cv-edu-year {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
}
.cv-cert-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}
.cv-cert-item span { color: var(--text-dim); font-size: 0.8rem; font-family: var(--mono); }
.cv-lang-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
}
.cv-lang-level { color: var(--green); font-size: 0.8rem; font-weight: 500; }
.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 40px;
  transition: border-color var(--transition), color var(--transition);
}
.cv-download:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-info h2 { font-size: 1.5rem; margin-bottom: 12px; }
.contact-info p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }
.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.contact-detail-icon { font-size: 1.1rem; color: var(--accent); width: 24px; }
.form-group { margin-bottom: 20px; }
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
input, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.1);
}
textarea { resize: vertical; min-height: 140px; }
.form-submit { width: 100%; margin-top: 8px; justify-content: center; font-size: 1rem; padding: 14px; }
.flash {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.flash-success { background: rgba(63,185,80,0.12); border: 1px solid rgba(63,185,80,0.3); color: var(--green); }
.flash-error   { background: rgba(248,81,73,0.12);  border: 1px solid rgba(248,81,73,0.3);  color: #f85149; }

/* ============================================================
   WEB DEV PAGE
   ============================================================ */
.webdev-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
}
.webdev-block h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.webdev-block .block-icon { font-size: 1.8rem; }
.webdev-block p { color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }

/* ============================================================
   FEATURED SECTION (home)
   ============================================================ */
.home-section { padding: 64px 0; }
.home-section + .home-section { border-top: 1px solid var(--border); }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
}
.section-header a {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.section-header a:hover { color: var(--accent); }

/* ============================================================
   404
   ============================================================ */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: var(--nav-h) 24px 0;
}
.not-found h1 { font-size: 6rem; font-weight: 700; color: var(--border); line-height: 1; margin-bottom: 16px; }
.not-found p { color: var(--text-muted); margin-bottom: 32px; }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.accent { color: var(--accent); }
.mono { font-family: var(--mono); }
.text-muted { color: var(--text-muted); }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    background: var(--surface2);
    border-radius: var(--radius);
    margin-top: 4px;
  }
  .nav-link { padding: 10px 12px; }

  .detail-layout,
  .cv-layout,
  .contact-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }

  .hero-name { font-size: 2.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 8px; }
}
