:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #ffffff;
  --text-primary: #ffffff;
  --text-secondary: #cfcfcf;
  --accent: #ffffff;
  --border: rgba(255, 255, 255, 0.14);
}

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

/* Global styles to prevent horizontal scrolling */
* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  background-image: url('../images/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
}

/* Hide main content during intro */
body.intro-active {
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

body.intro-active .navbar,
body.intro-active .hero,
body.intro-active .projects,
body.intro-active .about,
body.intro-active .contact,
body.intro-active .certifications {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

body.intro-complete .navbar,
body.intro-complete .hero,
body.intro-complete .projects,
body.intro-complete .about,
body.intro-complete .contact,
body.intro-complete .certifications {
  opacity: 1;
  visibility: visible;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.7);
  z-index: -1;
  pointer-events: none;
}

/* Custom Cursor */
.cursor, .cursor-follower {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
}

.cursor {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
}

.cursor-follower {
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent);
  transition: transform 0.15s;
}

body:hover .cursor,
body:hover .cursor-follower {
  opacity: 1;
}

/* Hide custom cursor on touch devices (no pointer) */
@media (hover: none), (pointer: coarse) {
  .cursor,
  .cursor-follower {
    display: none !important;
    opacity: 0 !important;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cursor,
  .cursor-follower,
  .fade-in,
  .hero-title,
  .hero-description,
  .loading-text,
  section,
  .project-card {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  html, body {
    scroll-behavior: auto !important;
  }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-text {
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* Intro overlay (typing) */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.intro-content {
  text-align: center;
  max-width: 100%;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-typing {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  color: #ffffff;
  white-space: nowrap;
  border-right: 2px solid #ffffff;
  display: inline-block;
  padding-right: 0;
  min-width: 0;
  font-weight: 300;
  letter-spacing: 0.5px;
  opacity: 0;
  animation: textFadeIn 0.6s ease-in-out 0.3s forwards;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* When the intro is hidden */
.intro-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  animation: fadeOut 1.2s ease-in-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    transition: none !important;
  }
  
  .intro-typing {
    animation: none !important;
    border-right: none !important;
  }
}

/* Typing intro (text) — keep simple styling (cursor handled via border-right) */


/* Ensure all main containers don't exceed viewport width */
.navbar,
.hero,
.projects,
.about,
.contact,
.certifications,
.projects-grid,
.certifications-grid {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: transparent;
  transition: all 0.3s ease;
  backdrop-filter: blur(0px);
}

.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-weight: bold;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 5rem);
  margin-bottom: 1rem;
  font-weight: 500;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.btn-primary:hover {
  background: #111;
  border-color: #111;
  color:rgb(255, 255, 255)
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgb(255, 255, 255);
  color:rgb(0, 0, 0)
}

/* Projects Grid */
.projects {
  padding: 8rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 4rem;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: #0f0f0f;
  border-radius: 12px;
  transform: translateY(0);
  transition: transform 0.15s ease;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
}

.project-image {
  width: 100%;
  height: 200px;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Removed project overlay gradient effect */

.project-info {
  padding: 1.5rem;
  background: #0f0f0f;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
}

.project-info h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text-primary);
  font-weight: 600;
  width: 100%;
}

.project-info p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--text-secondary);
  width: 100%;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  width: 100%;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.project-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  width: 100%;
  margin-top: auto;
}

/* Certifications Section */
.certifications {
  padding: 8rem 2rem;
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: 800px;
  margin: 0 auto;
}

.certifications-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.certification-card {
  background: #0f0f0f;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.certification-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.certification-card:hover::before {
  opacity: 1;
}

.certification-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #4285f4;
  transition: all 0.3s ease;
}

.certification-card:hover .certification-icon {
  background: rgba(66, 133, 244, 0.2);
  transform: scale(1.1);
}

.certification-content {
  flex: 1;
}

.certification-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.certification-provider {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.certification-description {
  margin: 0 0 1.5rem 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.certification-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.certification-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.certification-link i {
  font-size: 0.8rem;
}

/* About Section */
.about, .contact {
  padding: 8rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Contact Section */
.contact-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 1rem;
  border-radius: 50%;
  border: 1px solid transparent;
  width: 60px;
  height: 60px;
}

.contact-link:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border);
  transform: translateY(-3px) scale(1.05);
}

.contact-icon {
  font-size: 2rem;
  display: block;
  transition: transform 0.3s ease;
}

.contact-link:hover .contact-icon {
  transform: scale(1.1);
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-text {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Responsive Design */

/* Tablet and small desktop */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }
  
  .projects, .about, .contact, .certifications {
    padding: 6rem 2rem;
  }
}

/* Intro overlay mobile responsiveness */
@media (max-width: 768px) {
  .intro-overlay {
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
  
  .intro-content {
    max-width: calc(100vw - 2rem);
    width: calc(100vw - 2rem);
    padding: 0 1rem;
    margin: 0 auto;
  }
  
  .intro-typing {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .intro-overlay {
    padding: 0;
  }
  
  .intro-content {
    max-width: calc(100vw - 1.5rem);
    width: calc(100vw - 1.5rem);
    padding: 0 0.75rem;
  }
  
  .intro-typing {
    font-size: clamp(1rem, 5vw, 1.5rem);
    line-height: 1.3;
    letter-spacing: 0.3px;
  }
}

@media (max-width: 360px) {
  .intro-content {
    max-width: calc(100vw - 1rem);
    width: calc(100vw - 1rem);
    padding: 0 0.5rem;
  }
  
  .intro-typing {
    font-size: clamp(0.9rem, 6vw, 1.3rem);
    line-height: 1.2;
    letter-spacing: 0.2px;
  }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
  /* Navigation improvements */
  .navbar {
    padding: 1.5rem 1.5rem;
    position: relative;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }
  
  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
  
  .nav-links a {
    font-size: 1.5rem;
    font-weight: 500;
    padding: 1rem 2rem;
    display: block;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  
  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
  }
  
  .nav-brand {
    font-size: 1.1rem;
  }
  
  /* Hero section mobile optimization */
  .hero {
    padding: 0 1.5rem;
    min-height: 100vh;
  }
  
  .hero-title {
    font-size: clamp(2rem, 7vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
  }
  
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 1rem 1.5rem;
  }
  
  /* Projects grid mobile - keep two columns on tablets */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .project-image {
    height: 180px;
  }
  
  .project-info {
    padding: 1.25rem;
    gap: 0.75rem;
  }
  
  .project-info h3 {
    font-size: 1.1rem;
    line-height: 1.2;
  }
  
  .project-info p {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  .tech-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
  
  .project-link {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  /* Section spacing */
  .projects, .about, .contact, .certifications {
    padding: 4rem 1.5rem;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 3rem;
  }
  
  /* About section mobile */
  .about-content p {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  /* Contact section mobile */
  .contact-links {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  
  .contact-link {
    width: 50px;
    height: 50px;
  }
  
  .contact-icon {
    font-size: 1.5rem;
  }
  
  /* Certifications mobile */
  .certification-card {
    padding: 1.5rem;
  }
  
  .certification-content h3 {
    font-size: 1.2rem;
  }
  
  .certification-description {
    font-size: 0.95rem;
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  /* Navigation mobile */
  .navbar {
    padding: 1rem;
  }
  
  .navbar.scrolled {
    padding: 0.75rem 1rem;
  }
  
  .nav-brand {
    font-size: 1rem;
  }
  
  /* Hero mobile portrait */
  .hero {
    padding: 0 1rem;
    min-height: 100vh;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
    line-height: 1.1;
    margin-bottom: 1rem;
  }
  
  .hero-description {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
  }
  
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
  
  /* Projects mobile portrait */
  .project-image {
    height: 160px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-info {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .project-info h3 {
    font-size: 1rem;
    line-height: 1.2;
    margin: 0;
  }
  
  .project-info p {
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0;
  }
  
  .tech-tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }
  
  .project-link {
    font-size: 0.9rem;
  }
  
  /* Sections mobile portrait */
  .projects, .about, .contact, .certifications {
    padding: 3rem 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }
  
  /* About mobile portrait */
  .about-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }
  
  /* Contact mobile portrait */
  .contact-links {
    gap: 1rem;
  }
  
  .contact-link {
    width: 45px;
    height: 45px;
  }
  
  .contact-icon {
    font-size: 1.3rem;
  }
  
  /* Certifications mobile portrait */
  .certification-card {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
    gap: 1rem;
  }
  
  .certification-icon {
    align-self: center;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .certification-content h3 {
    font-size: 1.1rem;
    line-height: 1.3;
  }
  
  .certification-provider {
    font-size: 0.8rem;
  }
  
  .certification-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .certification-link {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
  }
}

/* Extra small devices - prevent horizontal scrolling */
@media (max-width: 360px) {
  /* Ensure no element exceeds viewport */
  * {
    max-width: 100vw;
  }
  
  /* Fix any potential overflow issues */
  .navbar {
    padding: 0.75rem 0.5rem;
  }
  
  .hero {
    padding: 0 0.5rem;
  }
  
  .projects, .about, .contact, .certifications {
    padding: 2rem 0.5rem;
  }
  
  .hero-title {
    font-size: clamp(1.6rem, 9vw, 2.4rem);
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  /* Single column for very small screens */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .project-image {
    height: 140px;
  }
  
  .project-info {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .project-info h3 {
    font-size: 0.9rem;
    line-height: 1.1;
    margin: 0;
  }
  
  .project-info p {
    font-size: 0.75rem;
    line-height: 1.2;
    margin: 0;
  }
  
  .tech-tag {
    font-size: 0.55rem;
    padding: 0.1rem 0.35rem;
  }
  
  .project-link {
    font-size: 0.75rem;
  }
  
  .contact-link {
    width: 40px;
    height: 40px;
  }
  
  .contact-icon {
    font-size: 1.2rem;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .contact-link {
    min-width: 44px;
    min-height: 44px;
  }
  
  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Improve touch feedback */
  .project-card:active {
    transform: scale(0.98);
  }
  
  .btn:active {
    transform: scale(0.95);
  }
  
  .contact-link:active {
    transform: scale(0.9);
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 2rem 1.5rem;
  }
  
  .hero-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
  }
  
  .hero-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-actions {
    flex-direction: row;
    gap: 1rem;
  }
  
  .btn {
    width: auto;
    max-width: none;
    padding: 0.75rem 1.25rem;
  }
}