/* ===========================================================
   THEME VARIABLES
   =========================================================== */
:root {
  --bg: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --text: #f2f2f2;
  --text-muted: #bfbfbf;
  --accent: #ff6a00; /* orange */
  --border: #333;
  --card-bg: #141414;
  --transition: 0.25s ease-in-out;
}

/* Light theme */
html.light-theme {
  --bg: #ffffff;
  --bg-secondary: #f2f2f2;
  --text: #111;
  --text-muted: #555;
  --accent: #ff6a00;
  --border: #ccc;
  --card-bg: #ffffff;
}

/* ===========================================================
   GLOBAL RESET
   =========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.8; }

/* ===========================================================
   NAVIGATION
   =========================================================== */
.nav-wrap {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* right-align nav links */
  padding: 1rem 2rem;
}

.nav .brand {
  margin-right: auto; /* pushes links to the right */
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
}

.nav .brand .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent); /* orange dot */
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.nav a.link {
  margin-left: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
}
.nav a.link.active, .nav a.link:hover { color: var(--accent); }

/* Hamburger for mobile */
.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  width: 30px;
  height: 24px;
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  display: block;
  background: var(--text);
  height: 3px;
  border-radius: 2px;
  position: absolute;
  width: 100%;
  transition: all 0.3s ease;
}
.hamburger span::before { content: ''; top: -8px; }
.hamburger span::after { content: ''; top: 8px; }
.hamburger.active span { background: transparent; }
.hamburger.active span::before { transform: rotate(45deg) translate(5px, 5px); top: 0; }
.hamburger.active span::after { transform: rotate(-45deg) translate(5px, -5px); top: 0; }

/* Drawer nav */
.drawer {
  position: fixed;
  top: 0;
  right: -260px;
  width: 240px;
  height: 100%;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  padding: 3rem 1.5rem;
  gap: 1rem;
  transition: right var(--transition);
  z-index: 1100;
}
.drawer.open { right: 0; }
.drawer a { color: var(--text); font-weight: 500; }
.drawer a:hover { color: var(--accent); }

/* Scrim overlay */
.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
}
.scrim.show { display: block; }

/* ===========================================================
   HERO SECTION
   =========================================================== */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem 1.5rem;
  justify-content: space-between;
}
.hero .kicker { font-weight: 600; color: var(--accent); margin-bottom: 0.5rem; }
.hero h1 { font-size: 2rem; margin-bottom: 1rem; }
.hero p.lead { color: var(--text-muted); margin-bottom: 1rem; max-width: 600px; }

.slideshow { position: relative; width: 100%; overflow: hidden; border-radius: 12px; }
.slide { display: none; }
.slide.active { display: block; }
.slide img { width: 100%; border-radius: 12px; }
.slide figcaption { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

/* ===========================================================
   SECTIONS
   =========================================================== */
section.wrap { padding: 3rem 2rem; }

h1,h2,h3 { color: var(--text); margin-bottom: 0.75rem; }
p { color: var(--text-muted); margin-bottom: 1rem; }

/* ===========================================================
   GRID HELPERS
   =========================================================== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 1.5rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns */
  grid-auto-rows: minmax(200px, auto);
  gap: 1.5rem;
}

@media (max-width: 1024px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

/* ===========================================================
   CARDS
   =========================================================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: transform 0.3s, border-color 0.3s;
}
.card img:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

/* ===========================================================
   BUTTONS
   =========================================================== */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity var(--transition);
}
.btn:hover { opacity: 0.85; }
.btn:not(.accent) {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ===========================================================
   CONTACT FORM
   =========================================================== */
form { display: flex; flex-direction: column; gap: 1rem; }
form input, form textarea {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  transition: border-color var(--transition);
}
form input:focus, form textarea:focus { outline: none; border-color: var(--accent); }
form button { align-self: flex-end; }

/* ===========================================================
   FOOTER
   =========================================================== */
footer {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

/* ===========================================================
   PORTFOLIO GRID (2 rows × 3 columns)
   =========================================================== */
#portfolio .grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 1.5rem;
}

#portfolio .card img {
  cursor: pointer;
  transition: transform 0.3s, border-color 0.3s;
  border: 1px solid var(--border);
  border-radius: 12px;
}
#portfolio .card img:hover {
  transform: scale(1.05);
  border-color: var(--accent);
}

/* ===========================================================
   LIGHTBOX / MODAL
   =========================================================== */
#portfolioModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
#portfolioModal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

/* ===========================================================
   MOBILE RESPONSIVE
   =========================================================== */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav a.link { display: none; }
  .hero { flex-direction: column; }
  .grid-3 { grid-template-columns: 1fr; }
}
