/* ================================================================
   GLOBAL & VARIABLES
   ================================================================ */

:root {
  --bg: #05070b;
  --surface: #0d1117;
  --surface-light: #141a22;
  --text: #f4f7fb;
  --text-secondary: #98a3b3;
  --accent: #5ee6ff;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.45);
  --max-width: 1400px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(94, 230, 255, 0.08), transparent 35%),
    radial-gradient(circle at bottom right, rgba(94, 230, 255, 0.04), transparent 30%);
  pointer-events: none;
  z-index: -1;
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.04em;
}

img {
  width: 100%;
  display: block;
}

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

.container {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section-title {
  font-size: clamp(2rem, 4vw, 4rem);
  margin-bottom: 24px;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.7;
  margin-bottom: 64px;
}

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

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 999;
  backdrop-filter: blur(16px);
  background: rgba(5, 7, 11, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  transition: 0.3s ease;
}

.nav-links a:hover {
  color: var(--text);
}

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

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.72;
  mask-image: radial-gradient(circle, black 45%, transparent 95%);
}

.hero {
  min-height: 85vh;
  padding-top: calc(var(--header-height) + 32px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  margin-bottom: 24px;
}

.hero-tagline {
  font-size: clamp(1.2rem, 2vw, 2rem);
  line-height: 1.35;
  font-weight: 500;
  max-width: 900px;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(3.5rem, 9vw, 7rem);
  line-height: 0.95;
  margin-bottom: 24px;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 650px;
  margin-bottom: 40px;
}

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

.btn {
  padding: 16px 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: 0.35s ease;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: black;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
}

.btn:hover {
  transform: translateY(-4px);
}

.hero-visual {
  position: relative;
  height: 650px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(94, 230, 255, 0.15), transparent 60%),
    #0b0f14;
  background-size: 50px 50px, 50px 50px, auto, auto;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);

  transform-style: preserve-3d;
  isolation: isolate;
}

.floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 24px;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
  overflow: hidden;
  overflow: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.card-1 {
  top: 60px;
  left: 40px;
  width: 180px;
}

.card-2 {
  bottom: 40px;
  right: 40px;
  width: 200px;
  background: linear-gradient(180deg, rgba(8, 12, 16, 0.92), rgba(8, 12, 16, 0.75));
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 3;
}

.card-2 p {
  color: rgba(244, 247, 251, 0.82);
}

.floating-card h3 {
  margin-bottom: 12px;
}

.floating-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ================================================================
  TOOLS
================================================================ */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.tool-card {
  position: relative;
  padding: 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.tool-label {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #8fd3ff;
  background: rgba(143, 211, 255, 0.08);
  border: 1px solid rgba(143, 211, 255, 0.15);
}

.tool-card h3 {
  margin-bottom: 16px;
  font-size: 1.4rem;
  line-height: 1.2;
}

.tool-card p {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.tool-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 18px;
}

.tool-list li {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

/* ================================================================
   ABOUT
   ================================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text {
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 1.05rem;
}

/* ================================================================
   HOW I WORK (PRINCIPLES)
   ================================================================ */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.principle-card {
  padding: 36px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  transition: 0.35s ease;
}

.principle-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 230, 255, 0.22);
}

.principle-number {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  margin-bottom: 18px;
}

.principle-card h3 {
  margin-bottom: 16px;
  font-size: 1.35rem;
}

.principle-card p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ================================================================
   PROJECTS
   ================================================================ */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  justify-items: left;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  width: 100%;
  max-width: 1280px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 230, 255, 0.25);
}

.project-media {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: #080c10;
}

.project-content {
  padding: 28px;
}

.project-content h3 {
  font-size: 1.55rem;
  margin-bottom: 14px;
}

.project-content p {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-card-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.project-tag {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(94, 230, 255, 0.08);
  border: 1px solid rgba(94, 230, 255, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.project-legacy-tag {
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e6b766;
  background: rgba(230, 183, 102, 0.08);
  border: 1px solid rgba(230, 183, 102, 0.25);
  border-radius: 999px;
}

.tech-stack {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.tech-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.btn-view-project {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-view-project:hover {
  border-color: rgba(94, 230, 255, 0.3);
  color: var(--accent);
}

/* ================================================================
   SKILLS (TABS + PANELS)
   ================================================================ */

#skills-container .skills-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.skill-tab {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  transition: all 0.22s ease;
}

.skill-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

.skill-tab.is-active {
  background: rgba(94, 230, 255, 0.07);
  border-color: rgba(94, 230, 255, 0.32);
  color: var(--accent);
}

.skills-panel {
  display: none;
}

.skills-panel.is-active {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skill-item {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  transition: transform 0.28s ease, border-color 0.28s ease;
  cursor: default;
}

.skill-item:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 230, 255, 0.2);
}

.skill-item-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 10px;
}

.skill-item-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.65;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.28s ease;
}

.skill-item:hover .skill-item-desc {
  max-height: 80px;
  opacity: 1;
}

/* ================================================================
   CONTACT
   ================================================================ */

.contact-box {
  text-align: center;
  padding: 80px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.contact-box h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  margin-bottom: 24px;
}

.contact-box p {
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.contact-link {
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: 0.3s ease;
}

.contact-link:hover {
  transform: translateY(-4px);
  border-color: rgba(94, 230, 255, 0.25);
}

/* ================================================================
   MODAL
   ================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  width: 100%;
  max-width: 1600px;
  max-height: 88vh;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.93) translateY(18px);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 48px 128px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.modal-overlay.is-open .modal-container {
  transform: scale(1) translateY(0);
}

.modal-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  height: 100%;
  min-height: 0;
  flex: 1;
}

/* Carousel (Media Panel) */
.modal-media {
  display: flex;
  flex-direction: column;
  background: #080c10;
  min-height: 320px;
}

.carousel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.carousel-track-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-item {
  flex: 0 0 100%;
  height: 100%;
}

.carousel-item img,
.carousel-item video,
.carousel-item iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-footer {
  flex-shrink: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(5, 7, 11, 0.6);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.carousel-dot.is-active {
  background: var(--accent);
  width: 20px;
  border-radius: 4px;
}

.carousel-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  line-height: 1;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* Modal Content Panel */
.modal-content {
  padding: 36px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.modal-content::-webkit-scrollbar {
  width: 4px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1rem;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.modal-tag {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  margin-bottom: 8px;
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 5px;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.modal-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.9rem;
}

.modal-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.modal-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(152, 163, 179, 0.6);
  margin-bottom: 12px;
}

.modal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-stack .tech-pill {
  font-size: 0.8rem;
  padding: 7px 14px;
}

.modal-highlights {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.modal-highlight-item::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  opacity: 0.7;
}

.modal-cs-grid {
  display: grid;
  gap: 10px;
}

.modal-cs-item {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.018);
}

.modal-cs-item.challenge {
  border-color: rgba(255, 140, 70, 0.2);
}

.modal-cs-item.solution {
  border-color: rgba(94, 230, 255, 0.18);
}

.modal-cs-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 9px;
}

.challenge .modal-cs-label {
  color: rgba(255, 140, 70, 0.85);
}

.solution .modal-cs-label {
  color: var(--accent);
  opacity: 0.85;
}

.modal-cs-text {
  color: var(--text-secondary);
  font-size: 0.865rem;
  line-height: 1.75;
}

.modal-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.modal-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid rgba(94, 230, 255, 0.16);
  background: rgba(94, 230, 255, 0.045);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.modal-link-btn::after {
  content: '↗';
  font-size: 0.8rem;
  opacity: 0.65;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal-link-btn:hover {
  background: rgba(94, 230, 255, 0.09);
  border-color: rgba(94, 230, 255, 0.4);
  color: #8ff0ff;
  transform: translateY(-2px);
}

.modal-link-btn:hover::after {
  transform: translate(2px, -2px);
  opacity: 1;
}

.modal-link-btn.is-primary {
  background: linear-gradient(135deg, rgba(94, 230, 255, 0.22), rgba(94, 230, 255, 0.08));
  border-color: rgba(94, 230, 255, 0.45);
  color: white;
}

.modal-legacy-note {
  display: none;
  margin-top: 1rem;
  margin-bottom: 1.4rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(230, 183, 102, 0.05);
  border: 1px solid rgba(230, 183, 102, 0.18);
}

.modal-legacy-title {
  color: #e6b766;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.modal-legacy-text {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

/* Related Projects */
.modal-related-section {
  margin-top: 8px;
}

.modal-related-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.related-project-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 230, 255, 0.3);
}

.related-card-image {
  height: 100px;
  background-size: cover;
  background-position: center;
}

.related-card-info {
  padding: 12px;
}

.related-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.related-card-category {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ================================================================
   REVEAL ANIMATION
   ================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

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

@media (max-width: 1280px) {
  .modal-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 340px 1fr;
    overflow-y: auto;
    max-height: 88vh;
  }

  .modal-container {
    max-height: 94vh;
    border-radius: 24px;
    overflow-y: auto;
  }

  .modal-content {
    padding: 28px 24px;
  }
}

@media (max-width: 1100px) {

  .hero-grid,
  .about-grid,
  .project-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .hero-grid {
    gap: 40px;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
    height: 420px;
    min-height: unset;
  }

  .hero h1 {
    max-width: 100%;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }


  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    max-width: 700px;
  }

  .project-media {
    min-height: 240px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .hero {
    padding-top: 110px;
  }

  .hero h1 {
    margin-top: 16px;
  }

    .card-1,
    .card-2 {
      width: 140px;
      padding: 16px;
    }
  
    .card-1 h3,
    .card-2 h3 {
      font-size: 0.9rem;
      margin-bottom: 6px;
    }
  
    .card-1 p,
    .card-2 p {
      font-size: 0.7rem;
      line-height: 1.4;
    }

  .nav-links {
    display: none;
  }

  .section {
    padding: 90px 0;
  }

  .project-media {
    min-height: 180px;
  }

  .project-content {
    padding: 18px;
  }

  .project-content h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
  }

  .project-content p {
    font-size: 0.82rem;
    line-height: 1.55;
    margin-bottom: 14px;
  }

  .tech-stack {
    gap: 8px;
  }

  .tech-pill {
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .btn-view-project {
    width: 100%;
    text-align: center;
    margin-top: 14px;
  }

  .contact-box {
    padding: 48px 28px;
  }

  .hero h1 {
    font-size: 3.5rem;
  }
}

@media (max-width: 600px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-container {
    border-radius: 24px 24px 0 0;
    max-width: 100%;
    max-height: 93vh;
  }

  .skills-panel.is-active {
    grid-template-columns: 1fr;
  }

  #skills-container .skills-tabs {
    gap: 6px;
  }

  .skill-tab {
    padding: 8px 16px;
    font-size: 0.82rem;
  }
}