:root {
  font-family: 'Manrope', sans-serif;
  --bg-color: #fff;
  --text-color: #000;
  --border-color: #000;
  --card-bg: #fff;
  --shadow-color: rgba(0, 0, 0, 0.25);
  --tag-bg: #fff;
  --tag-border: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
  --bg-color: #000;
  --text-color: #fff;
  --border-color: #fff;
  --card-bg: #111;
  --shadow-color: rgba(255, 255, 255, 0.1);
  --tag-bg: #222;
  --tag-border: rgba(255, 255, 255, 0.15);
}

html {
  scroll-behavior: smooth;
}

/* Enable snap scrolling only on desktop */
@media (min-width: 769px) {
  html {
    scroll-snap-type: y mandatory;
  }
}

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

body {
  background: var(--bg-color);
  margin: 0;
  padding: 0;
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typing intro state - lock page and hide elements */
body.typing-intro {
  overflow: hidden;
}

.typing-intro .hero .logo,
.typing-intro .hero-nav-column,
.typing-intro .dark-mode-toggle,
.typing-intro .border-top,
.typing-intro .latest-build,
.typing-intro .projects,
.typing-intro .about,
.typing-intro .contact,
.typing-intro .footer {
  opacity: 0;
  visibility: hidden;
}

/* Fade in animation for elements after typing */
.fade-in {
  opacity: 1 !important;
  visibility: visible !important;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.home {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-color);
  transition: background-color 0.3s ease;
}

.border-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  transition: background-color 0.3s ease;
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

@media (min-width: 769px) {
  .hero {
    scroll-snap-align: start;
  }
}

/* Hero Logo - Top Left Corner */
.hero .logo {
  position: absolute;
  left: 85px;
  top: 32px;
  font-weight: 800;
  font-size: 36px;
  line-height: 49px;
  color: var(--text-color);
  z-index: 11;
  transition: opacity 0.2s ease, color 0.3s ease;
  cursor: pointer;
}

.hero .logo:hover {
  opacity: 0.7;
}

/* Hero Navigation Column - Centered on Left */
.hero-nav-column {
  position: absolute;
  left: 60px;
  top: 55%;
  transform: translateY(-50%);
  width: 67px;
  height: 400px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-nav {
  position: relative;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 80px;
  height: 100%;
  justify-content: center;
}

.hero-nav a {
  font-weight: 300;
  font-size: 14px;
  line-height: 19px;
  color: var(--text-color);
  transform: rotate(-90deg);
  transform-origin: left center;
  transition: opacity 0.2s ease, color 0.3s ease;
  position: relative;
  white-space: nowrap;
  display: block;
}

.hero-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 2px;
  background: var(--border-color);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.hero-nav a:hover {
  opacity: 0.7;
}

/* Dynamic line lengths based on text content */
.hero-nav a[href="#home"]:hover::after {
  width: 32px;
  /* ~80% of "home" text width */
}

.hero-nav a[href="#projects"]:hover::after {
  width: 48px;
  /* ~80% of "projects" text width */
}

.hero-nav a[href="#about"]:hover::after {
  width: 52px;
  /* ~80% of "about me" text width */
}

.hero-nav a[href="#contact"]:hover::after {
  width: 44px;
  /* ~80% of "contact" text width */
}



/* Hero Title */
.hero-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'DotGothic16', monospace;
  font-weight: 400;
  font-size: clamp(32px, 4vw, 45px);
  line-height: 1.4;
  text-align: center;
  color: var(--text-color);
  white-space: nowrap;
  letter-spacing: -2px;
  word-spacing: -8px;
  transition: color 0.3s ease;
}

.hero-cursor {
  animation: none;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Dark Mode Label - Bottom Right with Padding */
.dark-mode-toggle {
  position: absolute;
  right: 30px;
  top: 32px;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  opacity: 0.7;
}

.dark-mode-toggle .sun-icon {
  display: block;
}

.dark-mode-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
  display: block;
}

/* Old dark-mode-label hover removed - now handled by button hover */

/* Latest Build Section */
.latest-build {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 60px 5% 40px;
  background: var(--bg-color);
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (min-width: 769px) {
  .latest-build {
    scroll-snap-align: start;
  }
}

.latest-build .section-header {
  text-align: left;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 50px;
  position: relative;
}

.latest-build .section-header::after {
  content: '';
  position: absolute;
  width: 0;
  height: 7px;
  left: 0;
  top: 50px;
  background: var(--border-color);
  transition: width 1.5s ease 0.5s, background-color 0.3s ease;
}

.latest-build.fade-in .section-header::after {
  width: 90px;
}

.latest-build-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1200px;
  width: 100%;
  align-items: center;
}

@media (min-width: 769px) {
  .latest-build-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
  }
}

.video-container {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--shadow-color);
}

.build-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  background: #000;
}

.build-video:focus {
  outline: none;
}

.build-info h3 {
  font-weight: 800;
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.build-description {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: #808080;
  margin-bottom: 24px;
}

.build-info .tags {
  margin-bottom: 30px;
}

.build-links {
  display: flex;
  gap: 20px;
}

.build-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-color);
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--tag-border);
  transition: all 0.3s ease;
}

.build-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.build-link svg {
  width: 16px;
  height: 16px;
}

/* Latest Build Mobile */\n@media (max-width: 768px) {
  .latest-build {
    padding: 40px 20px;
  }

  .latest-build .section-header {
    text-align: center;
  }

  .latest-build .section-header::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .build-info {
    text-align: center;
  }

  .build-info h3 {
    font-size: 24px;
  }

  .build-info .tags {
    justify-content: center;
  }

  .build-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.projects {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 60px 0 40px;
  background: var(--bg-color);
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (min-width: 769px) {
  .projects {
    scroll-snap-align: start;
  }
}

.section-header {
  position: relative;
  margin-bottom: 50px;
  text-align: right;
  width: 100%;
  max-width: 1200px;
}

.section-header p {
  font-weight: 800;
  font-size: 30px;
  line-height: 41px;
  color: var(--text-color);
  text-transform: lowercase;
  transition: color 0.3s ease;
}

.projects .section-header::after {
  content: '';
  position: absolute;
  width: 0;
  height: 7px;
  right: 0;
  top: 50px;
  background: var(--border-color);
  transition: width 1.5s ease 0.5s, background-color 0.3s ease;
}

.projects.fade-in .section-header::after {
  width: 90px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 60px;
  max-width: 1200px;
  width: 100%;
  margin-bottom: 40px;
}

.project-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  align-items: start;
}

.project-thumb {
  width: 200px;
  height: 150px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.project-content h3 {
  font-weight: 800;
  font-size: 24px;
  margin-bottom: 12px;
}

.project-content p {
  font-weight: 300;
  font-size: 12px;
  line-height: 16px;
  color: #808080;
  margin-bottom: 16px;
}

.tags {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.tags span {
  font-weight: 700;
  font-size: 8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 17px;
  background: var(--tag-bg);
  box-shadow: inset 0 0 0 1px var(--tag-border);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.text-link {
  font-weight: 600;
  font-size: 14px;
  position: relative;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.text-link:hover {
  opacity: 0.7;
}

.text-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--border-color);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.text-link:hover::after {
  width: 100%;
}

/* Project Hover Container */
.project-hover-container {
  position: relative;
  display: inline-block;
}

.hover-buttons {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  margin-top: 8px;
  z-index: 10;
}

.project-hover-container:hover .hover-buttons {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hover-btn {
  padding: 10px;
  background: var(--card-bg);
  border: 1px solid var(--tag-border);
  border-radius: 6px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px var(--shadow-color);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.hover-btn:hover {
  background: var(--tag-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.hover-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-color);
  transition: stroke 0.3s ease;
}



.btn-light {
  background: none;
  border: none;
  font-weight: 400;
  font-size: 14px;
  text-transform: lowercase;
  display: inline-block;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-top: 40px;
  color: var(--text-color);
  position: relative;
}

.btn-light:hover {
  opacity: 0.7;
}

.btn-light::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--border-color);
  transition: width 1.5s ease 1s, background-color 0.3s ease;
}

.projects.fade-in .btn-light::after {
  width: 20%;
}

.about {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 40px 0 30px;
  background: var(--bg-color);
  transition: background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (min-width: 769px) {
  .about {
    scroll-snap-align: start;
  }
}

.about .section-header {
  position: relative;
  margin-bottom: 30px;
  text-align: left;
  width: 100%;
  max-width: 1200px;
}

.about .section-header::after {
  content: '';
  position: absolute;
  width: 0;
  height: 7px;
  top: 50px;
  left: 0;
  background: var(--border-color);
  transition: width 1.5s ease 0.5s, background-color 0.3s ease;
}

.about.fade-in .section-header::after {
  width: 90px;
}

.about-content {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  max-width: 1200px;
  width: 100%;
  margin-bottom: 25px;
  align-items: start;
}

.portrait {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(0, 0, 0, 0.05);
}

.bio-copy h3 {
  font-weight: 600;
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.bio-copy p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--text-color);
}

.bio-links {
  display: flex;
  gap: 20px;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 500;
}

.bio-links a {
  transition: opacity 0.2s ease;
  color: var(--text-color);
}

.bio-links a:hover {
  opacity: 0.7;
}

.skill-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1200px;
  width: 100%;
  margin-bottom: 25px;
}

.chip {
  height: 65px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: var(--card-bg);
  border: 1px solid var(--tag-border);
  color: var(--text-color);
}

.chip span {
  font-weight: 600;
  font-size: 14px;
}

.chip img,
.chip svg {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
  opacity: 1;
}

[data-theme="dark"] .chip img,
[data-theme="dark"] .chip svg {
  filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  width: 100%;
}

.experience-card {
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--tag-border);
  padding: 24px 20px;
  min-height: 200px;
  position: relative;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--border-color);
  border-radius: 12px 0 0 12px;
}

.experience-card h4 {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.experience-card p {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
}

.contact {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 60px 5% 40px;
  text-align: center;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

@media (min-width: 769px) {
  .contact {
    scroll-snap-align: start;
  }
}

.contact .section-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.contact .section-header::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60px;
  height: 3px;
  background: var(--text-color);
  transition: transform 0.6s ease, background-color 0.3s ease;
  transform-origin: center;
}

.contact.animate .section-header::after {
  transform: translateX(-50%) scaleX(1);
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

.contact-icons {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 90px;
  margin: 0;
  padding: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}

.icon-btn img {
  width: 40px;
  height: 40px;
  transition: filter 0.3s ease;
}

[data-theme="dark"] .icon-btn img {
  filter: brightness(0) saturate(100%) invert(1);
}

.contact .btn-light {
  position: relative;
  margin-top: 20px;
}

.contact .btn-light::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  transform: scaleX(0);
  width: 20%;
  height: 1.5px;
  background: var(--text-color);
  transition: transform 0.8s ease 0.3s, background-color 0.3s ease;
  transform-origin: left;
}

.contact.animate .btn-light::after {
  transform: scaleX(1);
}

.footer {
  position: relative;
  width: 100%;
  padding: 60px 5% 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-color);
  transition: background-color 0.3s ease;
}

.footer .logo {
  font-weight: 800;
  font-size: 36px;
  color: var(--text-color);
  transition: opacity 0.2s ease, color 0.3s ease;
  cursor: pointer;
}

.footer .logo:hover {
  opacity: 0.7;
}

.footer .credit {
  font-weight: 300;
  font-size: 12px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

/* Mobile 
Responsive Design */
@media (max-width: 768px) {

  /* Hero Section Mobile */
  .hero {
    padding: 20px;
    height: 100vh;
  }

  .hero .logo {
    font-size: 24px;
    top: 20px;
    left: 20px;
  }

  .hero-nav-column {
    display: none;
  }

  /* Mobile dark-mode-toggle positioning handled in separate mobile section */

  .hero-content {
    text-align: left;
    padding: 0 20px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 20px;
  }

  .hero-subtitle {
    font-size: 14px;
    line-height: 1.4;
  }

  /* Projects Section Mobile */
  .projects {
    padding: 40px 20px;
  }

  .section-header {
    margin-bottom: 30px;
    text-align: center;
  }

  .section-header p {
    font-size: 24px;
  }

  .projects .section-header::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .project-thumb {
    width: 100%;
    height: 200px;
    margin: 0 auto;
  }

  .project-content h3 {
    font-size: 20px;
  }

  .project-content p {
    font-size: 14px;
    line-height: 1.5;
  }

  .tags {
    justify-content: center;
    flex-wrap: wrap;
  }

  .project-hover-container {
    justify-content: center;
  }

  /* About Section Mobile */
  .about {
    padding: 40px 20px;
  }

  .about .section-header {
    text-align: center;
    margin-bottom: 30px;
  }

  .about .section-header::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .portrait {
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }

  .bio-copy h3 {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .bio-copy p {
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
  }

  .bio-links {
    justify-content: center;
  }

  .skill-chips {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
  }

  .chip {
    height: 60px;
    padding: 0 16px;
    gap: 12px;
  }

  .chip span {
    font-size: 12px;
  }

  .chip img,
  .chip svg {
    width: 20px;
    height: 20px;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .experience-card {
    padding: 20px 16px;
    min-height: auto;
  }

  .experience-card h4 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .experience-card p {
    font-size: 12px;
    line-height: 1.5;
  }

  /* Contact Section Mobile */
  .contact {
    padding: 40px 20px 30px;
  }

  .contact .section-header {
    margin-bottom: 40px;
  }

  .contact .section-header p {
    font-size: 24px;
  }

  .contact-inner {
    gap: 30px;
  }

  .contact-icons {
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .icon-btn img {
    width: 32px;
    height: 32px;
  }

  .contact .btn-light {
    font-size: 12px;
  }

  /* Footer Mobile */
  .footer {
    padding: 20px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .footer .logo {
    font-size: 28px;
  }

  .footer .credit {
    font-size: 10px;
  }
}

/* Tablet Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero-content {
    padding: 0 40px;
  }

  .hero-title {
    font-size: 36px;
  }

  .projects,
  .about,
  .contact {
    padding: 60px 40px;
  }

  .projects-grid {
    gap: 40px 50px;
  }

  .about-content {
    gap: 40px;
  }

  .skill-chips {
    grid-template-columns: repeat(3, 1fr);
  }

  .experience-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .contact-icons {
    gap: 50px;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 12px;
  }

  .section-header p {
    font-size: 20px;
  }

  .project-content h3 {
    font-size: 18px;
  }

  .skill-chips {
    grid-template-columns: 1fr;
  }

  .contact-icons {
    gap: 30px;
  }

  .icon-btn img {
    width: 28px;
    height: 28px;
  }
}

/* Respo
nsive Design */
@media (max-width: 768px) {

  /* Hero elements styling for mobile - only visible after typing animation */
  .hero .logo.fade-in {
    display: block !important;
    font-size: 24px;
    top: 20px;
    left: 20px;
  }

  .dark-mode-toggle.fade-in {
    display: block !important;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .hero-nav-column {
    display: none;
  }

  .hero-content {
    text-align: center;
    padding: 0 20px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  /* Projects Mobile */
  .projects {
    padding: 40px 20px;
  }

  .section-header p {
    font-size: 24px;
  }

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

  .project-card {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .project-thumb {
    width: 100%;
    height: 200px;
  }

  /* About Mobile */
  .about {
    padding: 40px 20px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .portrait {
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }

  .skill-chips {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .chip {
    height: 60px;
    padding: 0 16px;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Contact Mobile */
  .contact {
    padding: 40px 20px 30px;
  }

  .contact-icons {
    gap: 30px;
    flex-wrap: wrap;
  }

  .footer {
    padding: 20px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero .logo {
    display: block !important;
  }

  .dark-mode-label {
    display: block !important;
  }

  .projects,
  .about,
  .contact {
    padding: 60px 40px;
  }

  .skill-chips {
    grid-template-columns: repeat(3, 1fr);
  }

  .experience-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Fix 
for missing hero elements on resize */
.hero .logo.fade-in,
.dark-mode-toggle.fade-in {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Ensure elements are visible after typing animation */
@media (max-width: 1200px) {
  .hero .logo.fade-in {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .dark-mode-toggle.fade-in {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* Hero elements will be shown after typing animation via fade-in class */

/* Ensure proper positioning on all screen sizes */
@media (min-width: 769px) {
  .hero .logo {
    position: absolute !important;
    top: 32px !important;
    left: 85px !important;
    font-size: 36px !important;
  }

  .dark-mode-toggle {
    position: absolute !important;
    top: 32px !important;
    right: 30px !important;
    width: 44px !important;
    height: 44px !important;
  }
}

/* Mobile d
ark mode toggle */
@media (max-width: 768px) {
  .dark-mode-toggle {
    width: 40px;
    height: 40px;
    top: 20px;
    right: 20px;
  }

  .dark-mode-toggle svg {
    width: 18px;
    height: 18px;
  }
}