/* ===== DESIGN SYSTEM ===== */

/* COLOR SCALES */
:root {
  /* Primary - Deep Blue */
  --primary-50: #f0f4f8;
  --primary-100: #d9e2ec;
  --primary-200: #bcccdc;
  --primary-300: #9fb3c8;
  --primary-400: #829ab1;
  --primary-500: #627d98;
  --primary-600: #486581;
  --primary-700: #334e68;
  --primary-800: #243b53;
  --primary-900: #19375d;

  /* Accent - Lime Green */
  --accent-50: #f9fef5;
  --accent-100: #f0fce3;
  --accent-200: #e6fac8;
  --accent-300: #dffdc9;
  --accent-400: #d4f7b4;
  --accent-500: #c5f09f;
  --accent-600: #b0e87e;
  --accent-700: #97db5c;
  --accent-800: #7dc93b;
  --accent-900: #62b31a;

  /* Secondary - Teal */
  --secondary-50: #e6f7f5;
  --secondary-100: #b3ebe3;
  --secondary-200: #80ded1;
  --secondary-300: #4dd2bf;
  --secondary-400: #1ac6ad;
  --secondary-500: #027361;
  --secondary-600: #026356;
  --secondary-700: #01534b;
  --secondary-800: #014340;
  --secondary-900: #013330;

  /* Tertiary - Lavender */
  --tertiary-50: #f9f7fe;
  --tertiary-100: #f0ebfd;
  --tertiary-200: #e7dffb;
  --tertiary-300: #d4c7fc;
  --tertiary-400: #c9b9fb;
  --tertiary-500: #beabf9;
  --tertiary-600: #a68ef5;
  --tertiary-700: #8e71f1;
  --tertiary-800: #7654ed;
  --tertiary-900: #5e37e9;

  /* Neutrals */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
}

/* TYPOGRAPHY SCALE */
:root {
  /* Type Scale (1.250 - Major Third) */
  --text-xs: 0.64rem;
  --text-sm: 0.8rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.563rem;
  --text-2xl: 1.953rem;
  --text-3xl: 2.441rem;
  --text-4xl: 3.052rem;
  --text-5xl: 3.815rem;

  /* Font Families */
  --font-header: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* Line Height */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
}

/* SPACING SCALE (8px base) */
:root {
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 5rem;
  --space-9: 6rem;
  --space-10: 8rem;
}

/* THEME VARIABLES */
[data-theme="light"] {
  --bg-primary: var(--neutral-50);
  --bg-secondary: white;
  --bg-tertiary: var(--neutral-100);
  --text-primary: var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-tertiary: var(--neutral-500);
  --border-color: var(--neutral-200);
  --shadow: rgba(0, 0, 0, 0.1);
  --gradient-start: #f0f4f8;
  --gradient-end: #e6f7f5;
}

[data-theme="dark"] {
  --bg-primary: var(--neutral-900);
  --bg-secondary: var(--neutral-800);
  --bg-tertiary: var(--neutral-700);
  --text-primary: var(--neutral-50);
  --text-secondary: var(--neutral-300);
  --text-tertiary: var(--neutral-400);
  --border-color: var(--neutral-700);
  --shadow: rgba(0, 0, 0, 0.5);
  --gradient-start: #0f172a;
  --gradient-end: #1e293b;
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  background: linear-gradient(
    135deg,
    var(--gradient-start) 0%,
    var(--gradient-end) 100%
  );
  background-attachment: fixed;
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-header);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-5xl);
}
h2 {
  font-size: var(--text-4xl);
}
h3 {
  font-size: var(--text-3xl);
}
h4 {
  font-size: var(--text-2xl);
}
h5 {
  font-size: var(--text-xl);
}
h6 {
  font-size: var(--text-lg);
}

/* ===== LAYOUT ===== */
.container {
  display: grid;
  grid-template-columns: 80px 1fr;
  min-height: 100vh;
}

.sidebar-left {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
}

.main-content {
  padding: 0 var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-6);
  background-color: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 12px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-left: var(--space-3);
}

.logo {
  font-family: var(--font-header);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  background: linear-gradient(135deg, var(--primary-900), var(--secondary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.email {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: var(--tracking-wide);
  transition: color 0.3s ease;
}

.email:hover {
  color: var(--secondary-500);
}

.resume-link {
  padding: var(--space-1) var(--space-3);
  background-color: var(--primary-900);
  color: var(--accent-300);
  text-decoration: none;
  border-radius: 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  transition: all 0.3s ease;
  cursor: pointer;
}

.resume-link:hover {
  background-color: var(--primary-800);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.navbar-right {
  display: flex;
  gap: var(--space-4);
  padding-right: var(--space-3);
}

.nav-link {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary-500), var(--tertiary-300));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  margin-right: var(--space-3);
}

.hamburger span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow);
  margin-top: var(--space-2);
  margin-right: var(--space-3);
  min-width: 200px;
  z-index: 1000;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ===== SIDEBAR ICONS ===== */
.icon-button {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.icon-button:hover {
  background-color: var(--secondary-500);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.icon-button svg {
  width: 24px;
  height: 24px;
}

/* ===== CONTENT SECTIONS ===== */
.hero {
  padding: var(--space-4) 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
  align-items: start;
}

.hero-text {
  max-width: 700px;
}

.hero h1 {
  background: linear-gradient(
    135deg,
    var(--primary-900),
    var(--secondary-500),
    var(--tertiary-300)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-2);
}

.hero-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-icon {
  width: 16px;
  height: 16px;
  color: var(--secondary-500);
}

.info-separator {
  color: var(--text-tertiary);
}

.hero p {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.hero-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.hero-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid var(--border-color);
  box-shadow: 0 8px 24px var(--shadow);
  transition: all 0.3s ease;
}

.hero-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: var(--secondary-500);
}

.hero-cta {
  padding: var(--space-2) var(--space-4);
  background-color: var(--primary-900);
  color: var(--accent-300);
  text-decoration: none;
  border-radius: 8px;
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
}

.hero-cta:hover {
  background-color: var(--primary-800);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* About Section Layout */
.about-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
  padding: var(--space-5);
}

.about-text {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.about-text p {
  margin-bottom: var(--space-3);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-image {
  display: none; /* Hide the image since we already have it in hero */
}

/* Skills Section - simplified, no category headers */
.skills-card {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.skills-card:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.skills-category h4 {
  display: none; /* Hide category titles */
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.skills-category:last-child .skills-grid {
  margin-bottom: 0;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: var(--space-2);
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.skill-item:hover {
  background-color: var(--tertiary-300);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

[data-theme="dark"] .skill-item:hover {
  background-color: var(--tertiary-700);
}

.skill-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.skill-item span {
  white-space: nowrap;
}

/* Responsive design: stack on small screens */
@media (max-width: 968px) {
  .about-card {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .skill-item {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
  }

  .skill-item svg {
    width: 16px;
    height: 16px;
  }
}

.section {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border-color);
}

.section-title {
  margin-bottom: var(--space-3);
  color: var(--primary-900);
}

[data-theme="dark"] .section-title {
  color: var(--accent-300);
}

.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--secondary-500);
}

.card h3 {
  color: var(--secondary-500);
  margin-bottom: var(--space-2);
}

.card p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ===== PROJECT LINKS ===== */
.project-links {
  display: inline-flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: var(--tertiary-300);
  color: var(--primary-900);
  text-decoration: none;
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  transition: all 0.3s ease;
}

.project-link:hover {
  background-color: var(--tertiary-400);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="dark"] .project-link {
  background-color: var(--tertiary-700);
  color: var(--accent-300);
}

[data-theme="dark"] .project-link:hover {
  background-color: var(--tertiary-600);
}

.project-link svg {
  width: 14px;
  height: 14px;
}

.video-demo {
  width: 100%;
  max-width: 700px;
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden; /* keeps rounded corners without affecting video view */
  position: relative;
  aspect-ratio: 16 / 9; /* ensures consistent container height */
}

.video-demo iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

.image-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 3rem auto;
  max-width: 1100px;
  text-align: center;
}

.image-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}

.project-image {
  flex: 1 1 48%;
  max-width: 48%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-image:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.image-blurb {
  margin-top: 2rem;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.8;
  max-width: 950px;
  text-align: justify;
}

/* Stack images vertically on smaller screens */
@media (max-width: 900px) {
  .image-row {
    flex-direction: column;
    align-items: left;
  }

  .project-image {
    max-width: 90%;
  }

  .video-demo iframe {
    height: 200px;
  }

  .image-blurb {
    text-align: center;
  }
}

.tags {
  margin-top: var(--space-3);
}

.tag {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background-color: var(--tertiary-300);
  color: var(--primary-900);
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  margin-right: var(--space-1);
  margin-top: var(--space-1);
}

[data-theme="dark"] .tag {
  background-color: var(--tertiary-700);
  color: var(--accent-300);
}

[data-theme="dark"] .tag:hover {
  background-color: var(--tertiary-600);
}

/* ===== CONTACT FORM ===== */
:root {
  --input-height: 50px;
}

.form-group input {
  height: var(--input-height);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 100%;
}
.contact-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  align-items: start;
}

/* Left column: name, email, subject */
.contact-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Right column: message + submit */
.contact-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

/* Make message box match height of name + email combined */
.contact-right textarea {
  height: calc((var(--input-height) * 2) + var(--space-2));
  min-height: 120px;
  resize: vertical;
}

/* Align submit button with the Subject input */
.contact-right .submit-btn {
  align-self: flex-start;
  margin-top: var(--space-2);
  height: var(--input-height);
}

/* On mobile, stack vertically */
@media (max-width: 768px) {
  .contact-form-fields {
    grid-template-columns: 1fr;
  }

  .contact-left,
  .contact-right,
  .submit-btn {
    width: 100%;
  }

  .contact-right textarea {
    height: auto;
  }
}

.form-group {
  margin-bottom: var(--space-2);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
  font-weight: 500;
  font-size: var(--text-sm);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-2);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-500);
  box-shadow: 0 0 0 3px rgba(2, 115, 97, 0.1);
}

.submit-btn {
  padding: var(--space-2) var(--space-4);
  background-color: var(--primary-900);
  color: var(--accent-300);
  border: none;
  border-radius: 6px;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.submit-btn:hover {
  background-color: var(--primary-800);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: var(--space-3);
  padding: var(--space-2);
  border-radius: 6px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 500;
  display: none;
}

.form-status.success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-status.error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ===== RESUME MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal-content {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: var(--text-2xl);
  color: var(--text-primary);
}

.close-modal {
  background: none;
  border: none;
  font-size: var(--text-3xl);
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

.resume-viewer {
  width: 100%;
  min-height: 600px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.modal-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.download-btn {
  padding: var(--space-2) var(--space-4);
  background-color: var(--primary-900);
  color: var(--accent-300);
  border: none;
  border-radius: 6px;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.download-btn:hover {
  background-color: var(--primary-800);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 60px 1fr;
  }

  .sidebar-left {
    gap: var(--space-3);
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .email {
    display: none;
  }

  h1 {
    font-size: var(--text-4xl);
  }
  h2 {
    font-size: var(--text-3xl);
  }
  h3 {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    padding-bottom: 80px;
  }

  .main-content {
    padding: 0 var(--space-3);
    grid-row: 1;
  }

  /* Fixed sidebar - moved to bottom */
  .sidebar-left {
    grid-row: 2;
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: var(--space-2);
    gap: var(--space-2);
    border-right: none;
    border-top: 1px solid var(--border-color);
    z-index: 99;
    backdrop-filter: blur(10px);
    background-color: var(--bg-secondary);
  }

  /* Mobile Navigation */
  .navbar {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--space-2);
    position: sticky;
    z-index: 100;
  }

  .navbar-left {
    gap: var(--space-2);
    padding-left: 0;
  }

  .navbar-right {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .email {
    display: none;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }

  .icon-button svg {
    width: 20px;
    height: 20px;
  }

  .hero {
    padding: var(--space-6) 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .hero-image-container {
    order: 1;
    max-width: 250px;
    margin: 0 auto;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero p {
    font-size: var(--text-base);
  }

  .section {
    padding: var(--space-5) 0;
  }

  .section-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
  }

  .card {
    padding: var(--space-3);
  }

  .card h3 {
    font-size: var(--text-xl);
  }

  .nav-link {
    font-size: var(--text-base);
  }

  .resume-link {
    font-size: var(--text-sm);
    padding: var(--space-1) var(--space-2);
  }

  .project-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--text-2xl);
  }
  h2 {
    font-size: var(--text-xl);
  }
  h3 {
    font-size: var(--text-lg);
  }

  .main-content {
    padding: 0 var(--space-2);
  }

  .hero h1 {
    font-size: var(--text-2xl);
  }

  .hero p {
    font-size: var(--text-sm);
  }

  .section-title {
    font-size: var(--text-xl);
  }

  .card {
    padding: var(--space-2);
  }

  .card h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-1);
  }

  .card p {
    font-size: var(--text-sm);
  }

  .tag {
    font-size: 0.6rem;
    padding: 4px 8px;
  }

  .navbar-left {
    gap: var(--space-1);
  }

  .navbar-right {
    gap: var(--space-2);
  }

  .nav-link {
    font-size: var(--text-sm);
  }

  .logo {
    font-size: var(--text-lg);
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .icon-button svg {
    width: 18px;
    height: 18px;
  }

  .modal-content {
    margin: var(--space-2);
  }

  .modal-header h2 {
    font-size: var(--text-xl);
  }
}

/* ===== PROJECT CONTENT (2-column layout) ===== */
.project-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1100px;
  margin: 3rem auto;
  padding: 1rem;
}

/* Left column — text, links, tags */
.project-text {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

/* Right column — image or video */
.project-media {
  flex: 1 1 40%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.project-media img,
.project-media iframe {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Optional hover effect for polish */
.project-media img:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Tag styling (if used) */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.tag {
  background-color: var(--bg-tertiary, #f2f2f2);
  color: var(--text-primary);
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.tag:hover {
  background-color: var(--bg-hover, #e6e6e6);
  transform: translateY(-1px);
}

/* Responsive stacking on smaller screens */
@media (max-width: 900px) {
  .project-content {
    flex-direction: column;
    align-items: left;
  }

  .project-text,
  .project-media {
    flex: 1 1 100%;
    align-items: left;
    text-align: left;
  }

  .project-media img,
  .project-media iframe {
    max-width: 90%;
  }
  .tags {
    justify-content: flex-start;
    gap: 0.3rem;
  }

  .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  color: var(--accent-300);
  font-weight: 600;
  background: var(--primary-900);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  pointer-events: none;
}

/* Variants */
.toast--success {
  background: linear-gradient(90deg, var(--primary-700), var(--primary-900));
  color: var(--accent-300);
}

.toast--error {
  background: linear-gradient(90deg, #7f1d1d, #b91c1c);
  color: #fff;
}

.toast--info {
  background: linear-gradient(
    90deg,
    var(--secondary-400),
    var(--secondary-600)
  );
  color: #fff;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}
