/* ===============================
   Minimal, Modern Base Styles
   =============================== */

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Design tokens */
:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --text: #222222;
  --muted: #777777;
  --border: #eaeaea;
  --accent: #0077ff;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Base */
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Focus styles (accessible, subtle) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===============================
   Header & Navigation
   =============================== */

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1100;
}

nav.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.4px;
}
.logo-img {
  height: 32px;
  width: auto;
  margin-right: 0.5rem;
}

/* Desktop links */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent); }

/* ===============================
   Hero (example section)
   =============================== */

.hero {
  text-align: center;
  padding: 4rem 0 3.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 4vw + 1rem, 2.75rem);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero p {
  max-width: 580px;
  margin: 0.25rem auto 2rem;
  color: #555;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { background: #0568de; transform: translateY(-1px); box-shadow: var(--shadow); }

.projects {
    padding: 3rem 0;
}

.projects h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.tab:hover {
    background: var(--bg);
}

.tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ===============================
   Projects
   =============================== */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}


/* ===============================
   Footer
   =============================== */

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ===============================
   Mobile Drawer Menu
   =============================== */

/* Toggle button (hamburger) */
.menu-toggle {
  display: none;              /* shown on mobile */
  position: relative;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1201;              /* above overlay & menu */
}

.menu-toggle .bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

/* Bar positions */
.menu-toggle .bar:nth-child(1) { top: 2px; }
.menu-toggle .bar:nth-child(2) { top: 10px; }
.menu-toggle .bar:nth-child(3) { top: 18px; }

/* Active = morph to "X" */
.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Full-screen overlay (fades in) */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  opacity: 0;
  pointer-events: none; /* Prevent clicks when hidden */
  transition: opacity 0.3s ease;
  z-index: 1000;

  display: flex;
  justify-content: flex-end;
}

/* Overlay visible */
.overlay.active {
  opacity: 1;
  background: rgba(0,0,0,0.45);
  pointer-events: auto;
}

/* Slide-in panel */
.overlay-menu {
  background: var(--surface);
  width: min(86vw, 320px);
  height: 100%;
  box-shadow: -2px 0 12px rgba(0,0,0,0.12);
  border-left: 1px solid var(--border);

  /* Start off-screen to the right */
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

/* Slide panel in when overlay active */
.overlay.active .overlay-menu {
  transform: translateX(0);
}

/* Menu links */
.overlay-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 84px 1.5rem 2rem;
}
.overlay-menu a {
  text-decoration: none;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 600;
}

/* Tap/click affordances */
.menu-toggle,
.nav-links a,
.overlay-menu a {
  -webkit-tap-highlight-color: transparent;
}

/* ===============================
   Responsive
   =============================== */
@media (max-width: 768px) {
  .nav-links { display: none; }    /* hide desktop links */
  .menu-toggle { display: block; } /* show hamburger */
}

/* ===============================
   Motion preferences
   =============================== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
