/* Base styling */
:root {
  --bg: #f7f8fb;
  --paper: #ffffff;
  --text: #000000;
  --muted: #000000;
  --primary: #046092;
  --primary-soft: #dbeefe;
  --accent: #0f766e;
  --border: #d8e1eb;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.10);

}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

html {
  scroll-behavior: smooth;
}

body.dark {
  --bg: #1e293b;
  --paper: #2d3748;
  --text: #e2e8f0;
  --muted: #e0e6ee;
  --primary: #38bdf8;
  --primary-soft: #cffafe;
  --accent: #14b8a6;
  --darkmode-switch-accent: #363636;
  --border: #475569;
  --shadow: 0 8px 24px rgba(255, 255, 255, 0.10);
}

a {
  color: var(--primary);
  text-decoration: none;
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-accent {
  color: var(--primary);
}

.main-nav a {
  margin-left: 1.25rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
}

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

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 48px;
  height: 26px;
  margin-left: 1rem;
  vertical-align: middle;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  left: 0;
  top: 0;
}

.main-nav {
  display: inline-flex;
  align-items: center;
}


.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  border-radius: 999px;
  transition: background-color 0.3s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 4px;
  top: 4px;
  background-color: #6e6e6e;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.theme-switch input:checked + .switch-slider {
  background-color: var(--darkmode-switch-accent);
}

.theme-switch input:checked + .switch-slider::before {
  transform: translateX(22px);
}

.theme-switch input:focus-visible + .switch-slider {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 6px;
  font-size: 0.62rem;
  color: #facc15;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.theme-switch input:checked + .switch-slider::after {
  content: "🌙";
  left: 6px;
  right: auto;
  color: #38bdf8;
}

.theme-switch input:not(:checked) + .switch-slider::after {
  content: "☀️";
}


.hero {
  padding: 5rem 0 4rem;
  background-image: url("assets/space.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg);
  opacity: 0.7;
  z-index: 1;
  transition: background-color 0.3s;
}

.hero-content {
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.hero h1 {
  margin: 0.6rem 0 1rem;
  font-size: clamp(2rem, 5vw, 3.45rem);
  line-height: 1.1;
}

.subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.3rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  padding: 0.78rem 1.2rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(3, 105, 161, 0.24);
}

.btn-secondary {
  background: var(--paper);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.section {
  padding: 3.75rem 0;
}

.section-alt {
  background-color: var(--paper);
  background-image: url("assets/space.jpg");
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: background-color 0.3s;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--paper);
  opacity: 0.5;
  z-index: 1;
  transition: background-color 0.3s;
}

.section-alt .container {
  position: relative;
  z-index: 2;
}

.section h2 {
  margin: 0 0 1.1rem;
  font-size: 1.8rem;
}

.section p {
  color: var(--muted);
  max-width: 760px;
}

#contact img {
  width: 20px;
  height: 20px;
  color: var(--primary);
  margin-right: 0.5rem;
  vertical-align: middle;
}

.about-list {
  margin-top: 1rem;
  padding-left: 1rem;
  color: var(--text);
}

.about-list li {
  margin-bottom: 0.6rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.skill-card,
.project-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.skill-card h3,
.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.frequency {
  color: var(--muted);
}

.link {
  font-weight: 600;
  color: var(--primary);
}

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links a {
  margin-left: 0.7rem;
}

@media (max-width: 768px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav {
    margin-top: 0.7rem;
  }

  .main-nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  .hero {
    padding-top: 4rem;
  }
}
