/*==========
  ========== */

/* Default: dark theme */
:root {
  --bg: #1f2430;
  --bg-alt: #232a36;
  --card-bg: #232a36;
  --card-border: #2b3240;

  --text-main: #cbccc6;
  --text-muted: #9da1a8;
  --heading: #ffffff;

  --accent: #ffcc66;
  --accent-soft: rgba(255, 204, 102, 0.15);
  --accent-strong: #ffd173;

  --nav-bg: rgba(31, 36, 44, 0.85);
  --nav-border: #2b3240;

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.4);

  --radius-card: 16px;

  --footer-bg: #1c202a;
}

/* Light theme overrides */
:root[data-theme="light"] {
  --bg: #f7f5f0; /* off-white */
  --bg-alt: #ffffff;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;

  --text-main: #1b1b1b;
  --text-muted: #6e6e6e;
  --heading: #111111;

  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-strong: #1d4ed8;

  --nav-bg: rgba(250, 249, 247, 0.9);
  --nav-border: #e0ded9;

  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.08);

  --footer-bg: #f1eee8;
}

:root[data-theme="light"] .project-card {
  background: #ffffff; /* still white, but softened by inner shadow */
  border: 1px solid #dedbd6;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .project-card:hover {
  border-color: #cfc7be;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .project-card p {
  color: #5a5a5a; /* softer warm grey */
}

:root[data-theme="light"] .project-card h3 a {
  color: #1a3ea1; /* stronger warm blue accent */
}

:root[data-theme="light"] .project-card h3 a:hover {
  color: #0d2f8c;
}

/* ==========
   Base styles
   ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  background: #2d3442; /* dark mode background */
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
  line-height: 1.6;
  padding-top: 65px;
}

/* Light-mode body background */
:root[data-theme="light"] body {
  background: var(--bg); /* off-white */
}

/* Global container spacing */
body > section,
body > footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

/* Links */
a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========
   Header / Nav
   ========== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(31, 36, 48, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 0;
}

:root[data-theme="light"] header {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}

header nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 1.5rem;
  color: var(--heading);
}

/* Optional nav links (if you ever re-enable them) */
nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Theme toggle */
.theme-toggle {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ==========
   Sections
   ========== */

section {
  margin-top: 2.25rem;
  padding: 2.25rem 1.5rem 2rem;
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] section {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

section:last-of-type {
  border-bottom: none;
  padding-bottom: 3rem;
}

section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--heading);
}

h3 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  color: var(--heading);
}

p {
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  max-width: 700px;
}

strong {
  color: var(--heading);
}

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

/* Lists */
ol,
ul {
  padding-left: 1.2rem;
  color: var(--text-main);
}

/* ==========
   About
   ========== */

.goals-list {
  margin-left: 1rem;
  padding-left: 1.2rem;
}

.goals-list li {
  margin-bottom: 0.35rem;
}

/* ==========
   Education / Experience / Dev / Hobbies
   ========== */

#education p,
#experience p,
#dev p,
#hobbies p {
  max-width: 750px;
}

.experience-item {
  margin-bottom: 1.5rem;
}

.dev-projects-title {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.dev-projects-carousel {
  margin-top: 0.25rem;
}

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

#projects {
  margin-top: 3rem;
}

.projects-title {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Outer container with arrows */
.projects-carousel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Viewport: hides overflow */
.projects-window {
  overflow: hidden;
  width: 100%;
}

/* Track: flex row of cards */
.projects-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.3s ease;
  will-change: transform;
}

/* ===== PROJECT CARDS: LOOK LIKE CARDS ===== */

.project-card {
  flex: 0 0 calc(33.333% - 0.67rem);
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.98)
  );
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.project-card .project-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.75rem;
  border: 1px solid var(--card-border);
}

:root[data-theme="light"] .project-card .project-image {
  border-color: #dcd7d2;
}

.project-card h3 {
  margin-bottom: 0.5rem;
}

.project-card h3 a,
.project-link {
  text-decoration: none !important;
  color: var(--accent-strong);
}

.project-card h3 a:hover,
.project-link:hover {
  text-decoration: underline !important;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Hover state */
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.7);
  border-color: var(--accent);
}

/* Arrows */
.projects-arrow {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-main);
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
  position: relative;
}

.arrow-icon {
  transform: translateY(-2px);
}

.projects-arrow:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.6);
}

.projects-arrow:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ==========
   Responsive tweaks
   ========== */

/* Medium screens – show 2 cards at a time */
@media (max-width: 900px) {
  .project-card {
    flex: 0 0 calc(50% - 0.5rem);
  }
}

/* Small screens – show 1 card at a time */
@media (max-width: 600px) {
  body > header,
  body > section,
  body > footer {
    padding: 1.25rem 1rem;
  }

  .projects-carousel {
    gap: 0.5rem;
  }

  .project-card {
    flex: 0 0 100%;
  }

  .projects-arrow {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.3rem;
  }

  header nav {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

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

footer {
  margin-top: 3rem;
  padding: 1rem 0 2rem;
  text-align: center;
  color: var(--text-muted);
  background: transparent;
}
