/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --ink: #1b1f23;
  --muted: #5b6770;
  --line: #e2e6ea;
  --accent: #0078d4;
  --accent-dark: #005a9e;
  --accent-tint: #eaf3fb;

  --display: "Segoe UI Semibold", "Arial", sans-serif;
  --body: "Segoe UI", -apple-system, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}

.cloud-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--ink);
}

.hero-role {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-tint);
  border: 1px solid #cfe4f7;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  margin-bottom: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #107c10;
  box-shadow: 0 0 0 0 rgba(16, 124, 16, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 124, 16, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(16, 124, 16, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 124, 16, 0); }
}

.status-sep {
  color: #a9c8e8;
}

#visitor-count {
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--line);
}

.section-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 1.5rem;
}

.about-text {
  font-size: 1.05rem;
  max-width: 65ch;
  color: var(--ink);
}

/* ---------- Skills ---------- */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag {
  font-size: 0.85rem;
  background: var(--accent-tint);
  border: 1px solid #cfe4f7;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  color: var(--accent-dark);
  font-weight: 600;
}

/* ---------- Experience expand card ---------- */
.expand-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 1rem;
  transition: border-color 0.15s ease;
}

.expand-card:hover,
.expand-card:focus-visible {
  border-color: var(--accent);
}

.expand-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.expand-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.card-sub {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
}

.chevron {
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  align-self: center;
}

.expand-card.open .chevron {
  transform: rotate(90deg);
}

.expand-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.expand-card.open .expand-card-body {
  max-height: 600px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.expand-card-body ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.expand-card-body li {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------- Projects: button + expanding panel ---------- */
.project-block {
  margin-bottom: 1rem;
}

.project-toggle {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.project-toggle:hover,
.project-toggle:focus-visible {
  border-color: var(--accent);
}

.project-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.project-toggle-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-toggle-text strong {
  font-size: 1rem;
  color: var(--ink);
}

.project-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border: 1px solid transparent;
  border-radius: 0 0 8px 8px;
}

.project-block.open .project-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--accent);
}

.project-block.open .project-details {
  max-height: 700px;
  border-color: var(--accent);
  border-top: 1px dashed var(--line);
  padding: 1.25rem;
}

.project-illustration {
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: block;
}

.architecture-diagram {
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.client-logo {
  max-width: 220px;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  display: block;
}

.expand-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.exp-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.project-details ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.project-details li {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.project-block.open .chevron {
  transform: rotate(90deg);
}

/* ---------- Contact ---------- */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .status-dot {
    animation: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .nav-links {
    gap: 0.9rem;
    font-size: 0.8rem;
  }
  .hero {
    padding: 3rem 1.25rem 2rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn {
    text-align: center;
  }

  .expand-card,
  .project-toggle {
    padding: 1rem;
  }

  .expand-card-head,
  .project-toggle {
    gap: 0.6rem;
  }

  .expand-card-title-row {
    gap: 0.6rem;
  }

  .exp-logo,
  .project-icon {
    width: 30px;
    height: 30px;
  }

  .expand-card h3,
  .project-toggle-text strong {
    font-size: 0.92rem;
    line-height: 1.3;
  }

  .card-sub {
    font-size: 0.78rem;
  }

  .chevron {
    font-size: 1.2rem;
  }

  .project-toggle-text,
  .expand-card-title-row > div {
    min-width: 0;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-links .btn {
    width: 100%;
  }
}
