/* ================================
   GLOBAL RESET + THEME
================================ */

:root {
  --deep-twilight: #03045e;
  --bright-teal-blue: #0077b6;
  --turquoise-surf: #00b4d8;
  --frosted-blue: #90e0ef;
  --light-cyan: #caf0f8;
  --background: #f8fdff;
  --card-bg: #ffffff;
  --text-main: #03045e;
  --text-muted: #425466;
  --border-soft: rgba(0, 119, 182, 0.22);
  --shadow-soft: 0 14px 30px rgba(3, 4, 94, 0.07);
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text-main);
  line-height: 1.6;
}

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

img {
  max-width: 100%;
}

summary {
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

summary:focus {
  outline: none;
}

summary:focus-visible {
  outline: 3px solid var(--frosted-blue);
  outline-offset: 5px;
  border-radius: 12px;
}

/* ================================
   NAVBAR
================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px 8%;
  background: rgba(248, 253, 255, 0.96);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(14px);
}

.logo {
  color: var(--deep-twilight);
  font-size: 1.08rem;
  font-weight: 800;
}

.navbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
}

.navbar nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.navbar nav a:hover,
.logo:hover {
  color: var(--bright-teal-blue);
}

/* ================================
   HERO
================================ */

.hero {
  width: min(var(--max-width), 88%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
  gap: 42px;
  align-items: center;
  min-height: 64vh;
  padding: 64px 0 46px;
}

.tagline {
  margin-bottom: 16px;
  color: var(--bright-teal-blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 22px;
  color: var(--deep-twilight);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.02;
}

.hero-description {
  max-width: 720px;
  margin-bottom: 30px;
  color: var(--text-muted);
  font-size: 1.22rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-block;
  padding: 12px 19px;
  border-radius: 999px;
  font-weight: 800;
}

.btn.primary {
  background: var(--bright-teal-blue);
  color: white;
}

.btn.primary:hover {
  background: var(--turquoise-surf);
}

.btn.secondary {
  border: 1px solid var(--bright-teal-blue);
  color: var(--bright-teal-blue);
}

.btn.secondary:hover {
  background: var(--light-cyan);
}

.hero-card {
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: white;
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.hero-card h3 {
  margin-bottom: 10px;
  color: var(--deep-twilight);
}

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

/* ================================
   SECTIONS - MINIMAL ACCORDION
================================ */

.section {
  width: min(var(--max-width), 88%);
  margin: 0 auto;
  padding: 18px 0;
}

.section-details {
  border-bottom: 1px solid var(--border-soft);
}

.section-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 28px 0;
  list-style: none;
}

.section-summary h2 {
  margin: 0;
  color: var(--deep-twilight);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.section-toggle::after,
.family-toggle::after,
.expand-indicator::after {
  content: "Open";
}

.section-details[open] > .section-summary .section-toggle::after,
.project-family[open] > .project-family-summary .family-toggle::after,
.project-accordion[open] > .project-summary .expand-indicator::after {
  content: "Close";
}

.section-toggle,
.family-toggle,
.expand-indicator {
  flex: 0 0 auto;
  border: 1px solid var(--frosted-blue);
  border-radius: 999px;
  background: var(--light-cyan);
  color: var(--deep-twilight);
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 900;
}

.section-body {
  padding: 8px 0 34px;
}

.narrow-body {
  max-width: 900px;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.section-intro {
  max-width: 780px;
  margin-bottom: 28px;
  color: var(--text-muted);
  font-size: 1.03rem;
}

.simple-section {
  border-bottom: 1px solid var(--border-soft);
}

.section-inner {
  padding: 28px 0;
}

.section-inner h2 {
  margin-bottom: 22px;
  color: var(--deep-twilight);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

/* ================================
   CARDS + GRIDS
================================ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
}

.cards-grid.three-columns {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.card {
  height: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: white;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(3, 4, 94, 0.04);
}

.card h3 {
  margin-bottom: 8px;
  color: var(--deep-twilight);
}

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

.muted {
  margin-bottom: 10px;
}

/* ================================
   PROJECT CATEGORIES
================================ */

.project-family {
  border-top: 1px solid var(--border-soft);
}

.project-family-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px 0;
  list-style: none;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--bright-teal-blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.project-family-summary h3 {
  color: var(--deep-twilight);
  font-size: 1.45rem;
}

.project-grid-accordion {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 20px;
  padding: 0 0 28px;
}

.empty-category {
  padding: 0 0 28px;
  color: var(--text-muted);
}

/* ================================
   PROJECT CARDS
================================ */

.detailed-project {
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 24px rgba(3, 4, 94, 0.05);
  overflow: hidden;
}

.detailed-project[open] {
  grid-column: 1 / -1;
}

.project-summary {
  display: flex;
  min-height: 265px;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  list-style: none;
}

.project-accordion[open] > .project-summary {
  min-height: auto;
  border-bottom: 1px solid var(--border-soft);
}

.project-number {
  margin-bottom: 8px;
  color: var(--bright-teal-blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.project-summary h3 {
  margin-bottom: 8px;
  color: var(--deep-twilight);
  font-size: 1.22rem;
  line-height: 1.35;
}

.project-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-meta span,
.skills-list span {
  border: 1px solid var(--frosted-blue);
  border-radius: 999px;
  background: var(--light-cyan);
  color: var(--deep-twilight);
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.expand-indicator {
  width: fit-content;
  margin-top: auto;
  background: var(--bright-teal-blue);
  color: white;
  border-color: var(--bright-teal-blue);
}

.project-accordion[open] > .project-summary .expand-indicator {
  margin-top: 0;
  background: var(--light-cyan);
  color: var(--deep-twilight);
  border-color: var(--frosted-blue);
}

.project-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 28px;
  padding: 24px;
}

.project-text h4 {
  margin: 18px 0 6px;
  color: var(--deep-twilight);
  font-size: 1.03rem;
}

.project-text h4:first-child {
  margin-top: 0;
}

.project-text p,
.project-text ul {
  color: var(--text-muted);
}

.project-text p {
  margin-bottom: 10px;
}

.project-text ul {
  margin: 0 0 12px 20px;
}

.project-text li {
  margin-bottom: 7px;
}

.case-study-link {
  display: inline-block;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--bright-teal-blue);
  color: white;
  padding: 11px 16px;
  font-weight: 900;
}

.case-study-link:hover {
  background: var(--turquoise-surf);
}

/* ================================
   VISUALS + CODE
================================ */

.project-visuals {
  display: grid;
  gap: 18px;
}

.visual-card {
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: white;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(3, 4, 94, 0.04);
}

.visual-label {
  display: block;
  border-bottom: 1px solid var(--border-soft);
  background: var(--light-cyan);
  color: var(--deep-twilight);
  padding: 11px 14px;
  font-size: 0.85rem;
  font-weight: 900;
}

.visual-card img {
  display: block;
  width: 100%;
  height: 310px;
  background: white;
  object-fit: contain;
  object-position: top center;
  padding: 12px;
}

.visual-card.large img {
  height: 390px;
}

.code-card {
  background: #0b1324;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(202, 240, 248, 0.16);
  background: #03045e;
  color: var(--light-cyan);
  padding: 11px 14px;
  font-size: 0.8rem;
  font-weight: 800;
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--frosted-blue);
}

.code-dots span:nth-child(2) {
  background: var(--turquoise-surf);
}

.code-dots span:nth-child(3) {
  background: var(--bright-teal-blue);
}

.code-preview {
  max-height: 360px;
  overflow: auto;
  background: #0b1324;
  color: #eafaff;
  padding: 22px;
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre;
}

/* ================================
   SKILLS + CONTACT + FOOTER
================================ */

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact p {
  max-width: 680px;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.contact-links a {
  border-bottom: 2px solid var(--bright-teal-blue);
  color: var(--deep-twilight);
  font-weight: 900;
}

.contact-links a:hover {
  color: var(--bright-teal-blue);
}

footer {
  width: min(var(--max-width), 88%);
  margin: 0 auto;
  padding: 26px 0 34px;
  color: var(--text-muted);
  text-align: center;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 1100px) {
  .project-grid-accordion,
  .cards-grid.three-columns {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .project-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .navbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .navbar nav {
    justify-content: flex-start;
    gap: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 44px;
  }

  .section,
  .hero,
  footer {
    width: min(92%, var(--max-width));
  }

  .section-summary,
  .project-family-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .cards-grid,
  .cards-grid.three-columns,
  .project-grid-accordion {
    grid-template-columns: 1fr;
  }

  .project-summary {
    min-height: auto;
  }

  .visual-card img,
  .visual-card.large img {
    height: 260px;
  }
}


/* ================================
   FINAL POLISH: EMPTY CATEGORIES, IMAGE ZOOM, BUTTONS
================================ */

.category-status {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.project-family-summary {
  padding: 20px 0;
}

.project-family[open] > .project-family-summary {
  padding-bottom: 14px;
}

.empty-category {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 20px;
  color: var(--text-muted);
}

.soon-badge {
  flex: 0 0 auto;
  border: 1px solid var(--frosted-blue);
  border-radius: 999px;
  background: var(--light-cyan);
  color: var(--deep-twilight);
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.visual-link {
  position: relative;
  display: block;
  background: white;
}

.visual-link::after {
  content: "Click to enlarge";
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(3, 4, 94, 0.88);
  color: white;
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.visual-link:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.visual-link:hover img {
  transform: scale(1.015);
}

.visual-card img {
  transition: transform 0.2s ease;
}

.disabled-link {
  cursor: not-allowed;
  background: var(--light-cyan);
  color: var(--deep-twilight);
  border: 1px solid var(--frosted-blue);
}

.disabled-link:hover {
  background: var(--light-cyan);
  color: var(--deep-twilight);
}

@media (max-width: 820px) {
  .empty-category {
    align-items: flex-start;
    flex-direction: column;
  }
}
