@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-alt: #eef2f2;
  --ink: #16232a;
  --ink-soft: #5e6d74;
  --line: #e1e6e6;
  --accent: #3891a6;
  --accent-deep: #2a7283;
  --accent-warm: #dd9a3d;
  --success: #4caf72;
  --danger: #c0392b;
  --solid-btn-bg: #1c2b31;
  --solid-btn-bg-hover: #10181c;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 6px rgba(22, 35, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 35, 42, 0.1);

  --font-body: "Poppins", sans-serif;
  --font-display: "Space Grotesk", "Poppins", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0e1618;
  --surface: #16232a;
  --surface-alt: #1c2b31;
  --ink: #eef3f3;
  --ink-soft: #9fb2b6;
  --line: #27383e;
  --accent: #5fbdd1;
  --accent-deep: #7fcadb;
  --accent-warm: #f0ac54;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);

  color-scheme: dark;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

html,
body {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

a:focus-visible,
button:focus-visible,
.card:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: white;
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

a,
.btn {
  transition: all ease 300ms;
}

a {
  color: var(--ink);
  text-decoration: none;
  text-decoration-color: white;
}

section {
  padding: 50px 20px;
  max-width: 1200px;
  margin: 50px auto;
}

.main-content {
  flex: 1;
}

/* Small monospace "file path" labels used as section identity markers,
   echoing the developer's own editor/terminal environment. */
.hero-eyebrow,
.section-path {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-deep);
  margin-bottom: 0.5rem;
}

.hero-eyebrow::after,
.section-path::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* ==========================================================================
   Navigation
   ========================================================================== */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
  padding: 20px 2rem 14px;
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

nav.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav-tabs {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-tab {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
}

.nav-tab .tab-path::before {
  content: "./";
  opacity: 0.55;
}

.nav-tab:hover,
.nav-tab.active {
  color: var(--ink);
  background: var(--surface-alt);
  border-bottom-color: var(--accent);
}

a:hover {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.5rem;
}

.nav-tab:hover {
  text-decoration: none;
}

.logodiv img {
  width: 120px;
  height: auto;
  display: block;
}

#ham-nav {
  display: none;
}

.ham-menu {
  position: relative;
  display: inline-block;
}

.ham-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.ham-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--ink);
  transition: all 0.3s ease-in-out;
}

.hamdiv {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--surface);
  border: 1px solid var(--line);
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  box-shadow: var(--shadow-md);
  border-radius: 0 0 8px 8px;
}

.hamdiv a {
  display: block;
  padding: 10px 15px;
  text-align: center;
  font-size: 1.2rem;
  color: var(--ink-soft);
  transition: all 0.3s ease-in-out;
}

.hamdiv li {
  list-style: none;
}

.hamdiv.open {
  max-height: 300px;
}

.ham-icon.open span:first-child {
  transform: rotate(45deg) translate(5px, 6px);
}

.ham-icon.open span:nth-child(2) {
  opacity: 0;
}

.ham-icon.open span:last-child {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ==========================================================================
   Theme toggle + back to top
   ========================================================================== */

.theme-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 1001;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-icon {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -5px -2px 0 0 var(--surface);
  transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle-icon {
  background: var(--accent-warm);
  box-shadow: none;
}

.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 800;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent-deep);
}

/* ==========================================================================
   Hero
   ========================================================================== */

#tervitus {
  position: relative;
  padding-top: 30px;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -11px -11px;
}

[data-theme="dark"] #tervitus {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
}

.portree {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  align-items: center;
}

.portree-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.portree h1 {
  font-size: 2.75rem;
}

.portree h3 {
  font-size: 1.5rem;
  color: var(--accent-deep);
  font-weight: 500;
}

.portree p {
  font-size: 1.15rem;
}

.hero-portrait {
  position: relative;
  justify-self: center;
}

.hero-portrait img {
  width: 340px;
  height: auto;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

.status-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.45rem 0.8rem 0.45rem 0.6rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(76, 175, 114, 0.25);
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.quick-facts li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-container {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.btn {
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-radius: 2rem;
  min-width: 120px;
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.btn-1:hover,
.btn-2:hover {
  cursor: pointer;
  transform: translateY(-2px);
}

.btn-1 {
  background: var(--solid-btn-bg);
  color: white;
  border: none;
}

.btn-1:hover {
  background: var(--solid-btn-bg-hover);
}

.btn-2 {
  background: none;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-2:hover {
  background: var(--solid-btn-bg);
  color: white;
  border-color: var(--solid-btn-bg);
}

.scroll-cue {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.scroll-cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  position: relative;
  animation: scroll-cue-pulse 2s ease-in-out infinite;
}

@keyframes scroll-cue-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.8);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ==========================================================================
   About
   ========================================================================== */

#about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#about .title {
  text-align: center;
}

#about .title h1 {
  font-size: 2.25rem;
}

.about-container {
  max-width: 900px;
  text-align: center;
  background-color: var(--surface);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  position: relative;
  margin-top: 30px;
}

.read-more-btn {
  background-color: var(--solid-btn-bg);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
}

.read-more-btn:hover {
  background-color: var(--solid-btn-bg-hover);
}

.popup {
  display: none;
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.popup-content {
  font-size: 1.1rem;
  background-color: var(--surface);
  color: var(--ink);
  margin: 10% auto;
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  width: 90%;
  max-width: 650px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.popup-content p {
  color: var(--ink-soft);
}

#short-about {
  font-size: 1.1rem;
}

.close-popup {
  color: var(--ink-soft);
  position: absolute;
  right: 16px;
  top: 10px;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
}

/* ==========================================================================
   Lightbox (enlarged photo view)
   ========================================================================== */

.lightbox {
  display: none;
  position: fixed;
  z-index: 1300;
  inset: 0;
  padding: 4rem 1.5rem;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Projects
   ========================================================================== */

.my-projects h1,
.skills-title h1,
#cv .title h1 {
  font-size: 2.25rem;
  margin-bottom: 10px;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 2rem;
}

.card {
  width: 260px;
  height: 320px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: white;
}

.card-front-body h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.card-front-body p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card-front .tech-tag {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.card-front,
.card-back {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card-back {
  transform: rotateY(180deg);
}

.card-back a {
  display: block;
  width: 100%;
  height: 100%;
}

.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-back img:hover {
  transform: scale(1.05);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--accent), var(--accent-deep));
  padding: 1.5rem;
  color: white;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Covers the whole card so any click on it opens the live demo, while
   the GitHub link below stays clickable on its own (higher z-index). */
.project-card-cover-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.project-card-body h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.project-card-body p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-card .tech-tag {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.project-card-link {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: white;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-link-card {
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--surface-alt);
  color: var(--ink);
}

.project-link-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
}

.project-link-icon {
  font-size: 1.75rem;
  color: var(--accent-deep);
}

.project-link-body p {
  font-size: 0.9rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--surface-alt);
}

/* ==========================================================================
   Skills
   ========================================================================== */

.carousel-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 40px auto 0;
}

.carousel-track {
  display: flex;
  gap: 50px;
  will-change: transform;
  backface-visibility: hidden;
  animation: scrolling 20s linear infinite;
}

.carousel-container:hover .carousel-track {
  animation-play-state: paused;
}

.carousel-track img {
  height: 100px;
  width: auto;
}

@keyframes scrolling {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Mock code-editor window that lists the same skills as a JS snippet —
   a small, thematically-grounded flourish for a developer's portfolio. */
.terminal-card {
  max-width: 720px;
  margin: 3rem auto 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1b2226;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: #10161a;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dot--red {
  background: #ff5f56;
}

.terminal-dot--yellow {
  background: #ffbd2e;
}

.terminal-dot--green {
  background: #27c93f;
}

.terminal-filename {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #8a9298;
}

.terminal-body {
  margin: 0;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #d4d8db;
  overflow-x: auto;
  white-space: pre;
}

.terminal-body .tok-comment {
  color: #7a8489;
}

.terminal-body .tok-kw {
  color: #f0ac54;
}

.terminal-body .tok-var {
  color: #7fcadb;
}

.terminal-body .tok-str {
  color: #9ad06a;
}

.terminal-body .tok-fn {
  color: #7fcadb;
}

.terminal-body .tok-bool {
  color: #f0ac54;
}

.toolbox {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.toolbox-group h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-deep);
  margin-bottom: 0.9rem;
  font-weight: 500;
}

/* ==========================================================================
   CV / Timeline
   ========================================================================== */

.cv-container {
  max-width: 900px;
  margin: 0 auto;
}

.cv-download {
  text-align: center;
  margin-bottom: 40px;
}

.cv-block {
  margin-bottom: 40px;
}

.cv-block h3 {
  font-size: 1.4rem;
  color: var(--accent-deep);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
}

.timeline {
  position: relative;
  margin-top: 1.5rem;
  padding-left: 2rem;
  border-left: 2px dashed var(--line);
  list-style: none;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.45rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-item.is-head::before {
  background: var(--accent-warm);
}

.timeline-hash {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-deep);
  margin-bottom: 0.15rem;
}

.timeline-item.is-head .timeline-hash {
  color: var(--accent-warm);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.timeline-item p:last-child {
  font-size: 0.95rem;
}

.timeline-item a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cv-block .tech-tags {
  margin-top: 5px;
}

.hobby-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  list-style: none;
}

.hobby-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.hobby-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.hobby-photo:hover img {
  transform: scale(1.06);
}

.hobby-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

/* ==========================================================================
   Contact
   ========================================================================== */

#contact {
  background: var(--surface-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.contact-intro h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-intro p {
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 500;
}

.contact-links a:hover {
  color: var(--accent-deep);
}

.contact-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.contact-container {
  background: var(--surface);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  width: 100%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
}

form button {
  background-color: var(--solid-btn-bg);
  color: white;
  padding: 12px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

form button:hover {
  background-color: var(--solid-btn-bg-hover);
}

#form-status {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background-color: var(--solid-btn-bg);
  color: white;
  text-align: center;
  padding: 30px 0;
  width: 100%;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  display: inline-flex;
  padding: 8px 14px;
  background: white;
  border-radius: var(--radius-md);
}

.footer-logo img {
  width: 90px;
  height: auto;
  display: block;
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  color: white;
  font-weight: 600;
}

.social-links a:hover {
  color: var(--accent-warm);
  text-decoration: underline;
}

.footer a {
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Media Queries for Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  #desktop-navbar {
    display: none;
  }

  #ham-nav {
    display: flex;
  }

  h1 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  p {
    font-size: 0.9rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 10px 15px;
  }

  .portree {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .portree-content {
    text-align: center;
    align-items: center;
  }

  .hero-eyebrow,
  .quick-facts {
    justify-content: center;
  }

  .hero-portrait {
    order: -1;
  }

  .hero-portrait img {
    max-width: 70%;
    width: 100%;
    margin-top: 20px;
  }

  .btn-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .projects-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .card,
  .project-link-card {
    width: 100%;
    max-width: 320px;
  }

  .carousel-container {
    overflow-x: auto;
  }

  .carousel-track img {
    max-width: 80px;
    height: auto;
  }

  .terminal-body {
    font-size: 0.72rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-links {
    align-items: center;
  }

  #contact-form {
    padding: 10px;
  }

  input,
  textarea {
    width: 100%;
    font-size: 0.9rem;
  }

  form button {
    width: 100%;
  }

  .theme-toggle {
    top: auto;
    bottom: 1.5rem;
    left: 1.5rem;
    right: auto;
  }
}