/* =========================================================
   Tokens
   ========================================================= */
:root {
  --bg: #ffffff;
  --particle-color: 44, 95, 138;
  --text: #16181d;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --surface: #ffffff;
  --surface-hover: #f3f4f6;
  --accent: #2c5f8a;
  --photo-bg: #efe9db;
  --dock-bg: rgba(255, 255, 255, 0.9);
  --dock-border: #e5e7eb;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 640px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 88px;
  --radius: 12px;
}

html[data-theme="dark"] {
  --bg: #0e0f12;
  --particle-color: 96, 165, 250;
  --text: #f2f2f3;
  --text-secondary: #9a9ea6;
  --border: #2a2c31;
  --surface: #17181c;
  --surface-hover: #1d1f24;
  --photo-bg: #2a2620;
  --dock-bg: rgba(20, 21, 25, 0.9);
  --dock-border: #2a2c31;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#particles-canvas {
  display: none;
}

.page,
.dock {
  position: relative;
}

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

p {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: var(--space-1) var(--space-2);
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3) 160px;
}

section {
  margin-bottom: var(--space-6);
}

/* =========================================================
   Hero
   ========================================================= */
.hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-1);
}

.hero-role {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 46ch;
  margin: 0;
}

.hero-photo {
  flex-shrink: 0;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--photo-bg);
  border: 2px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  position: relative;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo.no-photo img { display: none; }

.hero-photo.no-photo::after {
  content: "SS";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.hero-intro {
  font-style: italic;
  color: var(--text-secondary);
  max-width: 62ch;
  font-size: 1.02rem;
  margin-bottom: var(--space-4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover { opacity: 0.85; }

.btn-outline {
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover { border-color: var(--text); }

/* =========================================================
   Section divider
   ========================================================= */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  background: var(--surface);
}

.section-lede {
  margin-bottom: var(--space-3);
  max-width: 56ch;
}

/* =========================================================
   Entry list (experience / education / certifications / cloud)
   ========================================================= */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.entry {
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-2);
}

.entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.entry-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: none;
  padding: var(--space-1) 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius);
}

.entry-row-static {
  cursor: default;
}

button.entry-row:hover {
  background: var(--surface-hover);
}

.entry-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

.entry-avatar.sm {
  width: 34px;
  height: 34px;
  font-size: 0.66rem;
}

.entry-avatar.logo-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px;
}

.entry-avatar.logo-badge svg,
.entry-avatar.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.entry-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.entry-title {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}

.entry-sub {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.entry-date {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.chevron {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.entry.expandable[data-open="true"] .chevron {
  transform: rotate(180deg);
}

.entry-detail {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
  padding-left: 52px;
}

.entry-detail ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-1) 0 var(--space-2);
}

.entry-detail li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.entry-detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}

.two-col-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--space-3);
}

.two-col-list .entry {
  border-bottom: 1px solid var(--border);
}

/* =========================================================
   Skills / tags
   ========================================================= */
.skill-block {
  margin-bottom: var(--space-3);
}

.skill-block h3 {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tag-list li:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tag-list li svg,
.tag-list li .skill-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* =========================================================
   More / plain list
   ========================================================= */
.more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.more-grid h3 {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.plain-list li {
  padding: 3px 0;
  color: var(--text);
  font-size: 0.94rem;
}

/* =========================================================
   Contact
   ========================================================= */
.contact-block {
  padding-top: var(--space-1);
}

.contact-name {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.contact-location {
  margin-bottom: var(--space-2);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-3);
}

.contact-links a {
  color: var(--accent);
  font-size: 0.95rem;
  width: fit-content;
}

.contact-links a:hover {
  text-decoration: underline;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  text-align: center;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* =========================================================
   Floating dock
   ========================================================= */
.dock {
  position: fixed;
  left: 50%;
  bottom: var(--space-3);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  border-radius: 999px;
  backdrop-filter: blur(10px) saturate(180%);
  z-index: 50;
}

.dock-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dock-btn svg {
  width: 18px;
  height: 18px;
}

.dock-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.dock-btn.active {
  background: var(--text);
  color: var(--bg);
}

.dock-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 2px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 640px) {
  :root {
    --space-6: 56px;
    --space-5: 40px;
  }

  .page {
    padding-top: var(--space-5);
  }

  .hero-row {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .hero-photo {
    width: 96px;
    height: 96px;
  }

  .two-col-list,
  .more-grid {
    grid-template-columns: 1fr;
  }

  .dock {
    gap: 2px;
    padding: 6px;
  }

  .dock-btn {
    width: 36px;
    height: 36px;
  }

  .entry-date {
    display: none;
  }
}
