/* Variables & base */
:root {
  --bg: #0f1724;
  --muted: #9aa3b2;
  --accent: #34d399;
  --accent2: #06b6d4;
  --card: #0b1220;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.5;
  margin: 0;
  background: linear-gradient(180deg, #071023 0%, #0b1220 100%);
  color: #e6eef8;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(4, 6, 12, 0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--accent);
  margin: 2px 0;
  transition: 0.3s;
  border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #04293a;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
  overflow: hidden;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
}

.brand-text {
  font-size: 14px;
}

.muted {
  color: var(--muted);
}

.nav a {
  margin-left: 18px;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

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

.nav .btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  padding: 10px 14px;
  border-radius: 8px;
  color: #032022;
  text-decoration: none;
  font-weight: 600;
}

/* Hero */
.hero {
  text-align: center;
  padding: 80px 0;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 24px;
  line-height: 1.1;
}

.lead {
  color: #cbd8e6;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.cta-row {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

/* Enhanced Touch Targets for Mobile */
.btn-primary,
.btn-ghost,
.btn-outline {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-ghost {
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  color: inherit;
  margin-right: 8px;
  transition: background 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--accent);
}

.quick-list {
  margin-top: 18px;
  color: var(--muted);
}

/* Enhanced Grid for Better Mobile Layout */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Better mobile grid for smaller screens */
@media (max-width: 650px) {
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Global Typography Improvements */
section p {
  line-height: 1.6;
  margin-bottom: 16px;
}

section p:last-child {
  margin-bottom: 0;
}

/* Skills Section */
.skills {
  padding: 80px 0;
}

.previews {
  padding: 80px 0;
}

.about-brief {
  padding: 80px 0;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.about-brief h2 {
  margin-bottom: 20px;
}

.about-brief p {
  color: #cbd8e6;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.skills h2 {
  text-align: center;
  margin-bottom: 48px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-size: 32px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.skill-category {
  background: rgba(255, 255, 255, 0.03);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.skill-category:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(52, 211, 153, 0.3);
  transform: translateY(-2px);
}

.skill-category h3 {
  color: var(--accent);
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

.skill-category p {
  color: #cbd8e6;
  margin-bottom: 12px;
  line-height: 1.6;
  font-size: 14px;
}

.skill-category p:last-child {
  margin-bottom: 0;
}

.skill-category strong {
  color: #e6eef8;
}

/* Section Headers */
.previews h2 {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-size: 32px;
  margin-bottom: 32px;
}

.about-brief h2 {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  font-size: 32px;
  margin-bottom: 20px;
}

/* Enhanced Touch Feedback and Accessibility */
.proj-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  /* Enhanced touch feedback */
  -webkit-tap-highlight-color: rgba(52, 211, 153, 0.1);
}

.proj-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(52, 211, 153, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.proj-card:hover::before,
.proj-card:active::before {
  opacity: 1;
}

.proj-card:hover,
.proj-card:active {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.6);
  border-color: rgba(52, 211, 153, 0.3);
}

.proj-card.clickable {
  cursor: pointer;
}

.proj-card.clickable:hover,
.proj-card.clickable:active {
  background: rgba(255, 255, 255, 0.06);
}

/* Mobile touch optimization */
@media (max-width: 900px) {
  .proj-card:active {
    transform: translateY(-3px);
    transition: transform 0.1s ease;
  }
}

.proj-card > * {
  position: relative;
  z-index: 2;
}

.proj-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.proj-card:hover img {
  transform: scale(1.02);
}

.proj-card h4, .proj-card h3 {
  margin: 10px 0 6px;
}

.proj-card p {
  color: var(--muted);
  font-size: 14px;
}

.proj-card .link {
  display: inline-block;
  margin-top: 8px;
  text-decoration: none;
  color: var(--accent);
}

/* Other Projects Section */
.other-projects {
  margin: 80px 0 60px 0;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.other-projects h2 {
  text-align: center;
  margin-bottom: 40px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 28px;
  font-weight: 700;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin-top: 32px;
}

.project-category {
  background: linear-gradient(145deg, rgba(15,23,36,0.6), rgba(11,18,32,0.6));
  border-radius: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.project-category:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-category h3 {
  color: var(--accent);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-category h3::before {
  content: "🚀";
  font-size: 18px;
}

.project-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-category li {
  margin-bottom: 16px;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
  color: #cbd8e6;
}

.project-category li::before {
  content: "▪";
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 16px;
}

.project-category li:last-child {
  margin-bottom: 0;
}

.project-category strong {
  color: var(--accent2);
  font-weight: 600;
}

/* About Page */
.about-content {
  max-width: 1100px;
  padding: 80px 0;
}

.about-content h1 {
  margin-bottom: 8px;
}

.about-content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--accent);
}

.about-content p, .about-content ul {
  margin-bottom: 16px;
  color: #cbd8e6;
  line-height: 1.6;
}

.about-content ul {
  padding-left: 20px;
}

.about-content li {
  margin-bottom: 8px;
}

.about-content .btn-outline {
  margin-top: 24px;
  display: inline-block;
}

/* About Page Mobile Improvements */
@media (max-width: 600px) {
  .about-content {
    padding: 35px 0;
  }
  
  .about-content h1 {
    font-size: 26px;
    margin-bottom: 12px;
    line-height: 1.3;
  }
  
  .about-content h3 {
    font-size: 18px;
    margin-top: 28px;
    margin-bottom: 14px;
  }
  
  .about-content p, .about-content ul {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 18px;
  }
  
  .about-content ul {
    padding-left: 18px;
  }
  
  .about-content li {
    margin-bottom: 10px;
  }
}

/* Contact Page */
.contact-content {
  padding: 80px 0;
}

.contact-content h1 {
  margin-bottom: 12px;
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-content > p {
  margin-bottom: 40px;
  font-size: 16px;
  line-height: 1.6;
  color: #cbd8e6;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}

/* Form Enhancements for Mobile */
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font-size: 16px;
  min-height: 48px;
  transition: all 0.2s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form label {
  margin-top: 16px;
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: #e6eef8;
}

.form-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.contact-form .btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  padding: 12px 24px;
  border-radius: 8px;
  color: #032022;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.contact-form .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.3);
}

.contact-form .btn-outline {
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.contact-form .btn-outline:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.contact-aside h3 {
  margin-bottom: 10px;
}

.socials a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 12px;
}

.socials a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  padding: 40px 0 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 60px;
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.footer-row > div:first-child {
  justify-self: start;
}

.footer-row > div:last-child {
  justify-self: end;
}

.footer-socials {
  justify-self: center;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(8px);
  z-index: 200;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal.modal-opening {
  animation: fadeIn 0.3s ease forwards;
}

.modal.modal-closing {
  animation: fadeOut 0.2s ease forwards;
}

.modal-panel {
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  background: linear-gradient(145deg, rgba(15,23,36,0.98), rgba(11,18,32,0.98));
  border-radius: 16px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}

.modal.modal-opening .modal-panel {
  animation: slideUp 0.3s ease forwards;
}

.modal.modal-closing .modal-panel {
  animation: slideDown 0.2s ease forwards;
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.1);
}

.modal-content h2 {
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 28px;
  font-weight: 700;
}

.modal-content p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.modal-images img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-images img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Clickable image containers */
.modal-images > div {
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.modal-images > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.modal-images > div::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal-images > div:hover::after {
  opacity: 1;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0 }
  to { opacity: 1 }
}

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

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

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

/* Enhanced Mobile Responsive Design */
@media (max-width: 1200px) {
  .container {
    padding: 0 24px;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 0 20px;
  }
  
  /* Mobile Navigation */
  .nav-toggle {
    display: flex;
  }
  
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(4, 6, 12, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .nav a {
    margin-left: 0;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
  }
  
  .nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
  }
  
  .nav-row {
    position: relative;
    padding: 20px 0;
  }
  
  .hero {
    padding: 50px 0;
  }
  
  .hero h1 {
    font-size: 32px;
    line-height: 1.2;
  }
  
  .lead {
    font-size: 16px;
    margin-bottom: 28px;
  }
  
  .skills, .previews, .about-brief {
    padding: 50px 0;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  /* Skills responsive */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .skills h2 {
    font-size: 28px;
  }
  
  /* Modal mobile adjustments */
  .modal {
    padding: 15px;
    align-items: flex-start;
    padding-top: 30px;
  }
  
  .modal-panel {
    padding: 28px 24px;
    max-height: 85vh;
    width: 100%;
  }
  
  .modal-content h2 {
    font-size: 24px;
  }
  
  .modal-images {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .modal-images img {
    height: 200px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }
  
  .nav-row {
    padding: 18px 0;
  }
  
  .nav a {
    font-size: 15px;
    padding: 14px 18px;
  }
  
  .brand {
    gap: 10px;
  }
  
  .logo {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }
  
  .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
  }
  
  .brand-text {
    font-size: 13px;
  }
  
  .hero {
    padding: 35px 0;
  }
  
  .hero h1 {
    font-size: 26px;
    margin-bottom: 18px;
    line-height: 1.25;
  }
  
  .lead {
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.6;
  }
  
  .cta-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .btn-ghost, .btn-outline {
    padding: 14px 20px;
    font-size: 15px;
    margin-right: 0;
    min-height: 50px;
    font-weight: 500;
  }
  
  .skills, .previews, .about-brief {
    padding: 35px 0;
  }
  
  .skills h2, .previews h2, .about-brief h2 {
    font-size: 22px;
    margin-bottom: 24px;
  }
  
  .skill-category {
    padding: 20px 18px;
    border-radius: 10px;
  }
  
  .skill-category h3 {
    font-size: 17px;
    margin-bottom: 14px;
  }
  
  .skill-category p {
    font-size: 14px;
    line-height: 1.7;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .proj-card {
    padding: 14px;
    border-radius: 10px;
  }
  
  .proj-card img {
    height: 150px;
    border-radius: 6px;
  }
  
  .proj-card h4, .proj-card h3 {
    margin: 12px 0 8px;
    font-size: 16px;
  }
  
  .proj-card p {
    font-size: 14px;
    line-height: 1.6;
  }
  
  /* Other Projects Mobile Styles */
  .other-projects {
    margin: 50px 0 40px 0;
    padding: 30px 0;
  }
  
  .other-projects h2 {
    font-size: 22px;
    margin-bottom: 30px;
  }
  
  .projects-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .project-category {
    padding: 20px;
    border-radius: 12px;
  }
  
  .project-category h3 {
    font-size: 18px;
    margin-bottom: 16px;
  }
  
  .project-category li {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
  }
  
  .modal-panel {
    padding: 20px 16px;
    border-radius: 12px;
  }
  
  .modal-content h2 {
    font-size: 20px;
  }
  
  .modal-content p {
    font-size: 14px;
    line-height: 1.7;
  }
  
  /* Contact Page Mobile Improvements */
  .contact-content h1 {
    font-size: 32px;
    margin-bottom: 16px;
  }
  
  .contact-content > p {
    font-size: 15px;
    margin-bottom: 32px;
  }
  
  .contact-form input, .contact-form textarea {
    padding: 18px 16px;
    font-size: 16px;
    border-radius: 10px;
  }
  
  .contact-form label {
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 15px;
  }
  
  .contact-form .btn-primary {
    padding: 16px 24px;
    font-size: 15px;
    min-height: 52px;
    border-radius: 10px;
  }
  
  .contact-aside {
    margin-top: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .contact-aside h3 {
    margin-bottom: 16px;
    font-size: 18px;
  }
  
  .contact-aside p {
    margin-bottom: 12px;
    font-size: 14px;
  }
  
  .footer-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
    padding: 20px 0;
  }
  
  .footer-row > div:first-child,
  .footer-row > div:last-child {
    justify-self: center;
    font-size: 13px;
  }
  
  .footer-row > div:last-child {
    order: 3;
  }
  
  .footer-socials {
    order: 2;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0 14px;
  }
  
  .hero {
    padding: 30px 0;
  }
  
  .hero h1 {
    font-size: 22px;
    line-height: 1.3;
  }
  
  .lead {
    font-size: 14px;
    line-height: 1.7;
  }
  
  .skills h2, .previews h2, .about-brief h2 {
    font-size: 19px;
  }
  
  .skill-category {
    padding: 16px 14px;
  }
  
  .skill-category h3 {
    font-size: 16px;
  }
  
  .skill-category p {
    font-size: 13px;
  }
  
  .proj-card {
    padding: 12px;
  }
  
  .proj-card img {
    height: 130px;
  }
  
  .proj-card h4, .proj-card h3 {
    font-size: 15px;
  }
  
  .proj-card p {
    font-size: 13px;
  }
  
  .footer-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 12px;
    padding: 16px 0;
  }
  
  .footer-socials .social-icon {
    width: 32px;
    height: 32px;
    margin: 0 4px;
  }
  
  .footer-row > div:first-child,
  .footer-row > div:last-child {
    font-size: 12px;
  }
  
  /* Contact improvements for very small screens */
  .contact-content h1 {
    font-size: 26px;
  }
  
  .contact-form input, .contact-form textarea {
    padding: 16px 14px;
  }
  
  .contact-aside {
    padding: 16px;
  }
  
  .contact-aside h3 {
    font-size: 16px;
  }
  
  .contact-aside p {
    font-size: 13px;
  }
  
  /* Modal improvements for very small screens */
  .modal {
    padding: 8px;
  }
  
  .modal-panel {
    padding: 16px 12px;
    border-radius: 10px;
  }
  
  .modal-content h2 {
    font-size: 18px;
  }
  
  .modal-close {
    right: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
  }
}

/* Enhanced Social Media Icons for Mobile */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  /* Enhanced touch target for mobile */
  min-width: 44px;
  min-height: 44px;
}

.social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.social-icon:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.social-icon:hover::before {
  left: 100%;
}

.social-icon svg {
  transition: all 0.3s ease;
  z-index: 1;
  position: relative;
}

.social-icon:hover svg {
  transform: scale(1.1);
}

/* Social Icons Container */
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 28px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-socials {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 24px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.footer-socials .social-icon {
  width: 36px;
  height: 36px;
  margin: 0 4px;
  border-radius: 8px;
}

/* Mobile responsiveness for social icons */
@media (max-width: 600px) {
  .social-icon {
    width: 42px;
    height: 42px;
    margin: 0 6px;
    border-radius: 10px;
  }
  
  .footer-socials .social-icon {
    width: 34px;
    height: 34px;
    margin: 0 3px;
  }
  
  .social-icons {
    margin: 20px 0;
    gap: 6px;
  }
  
  .contact-socials {
    justify-content: center;
    margin: 20px 0;
  }
  
  /* Modal responsiveness */
  .modal {
    padding: 12px;
  }
  
  .modal-panel {
    padding: 20px;
    max-height: 85vh;
  }
  
  .modal-content h2 {
    font-size: 22px;
  }
  
  .modal-content p {
    font-size: 14px;
  }
  
  .modal-images {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .modal-images img {
    height: 160px;
  }
  
  .modal-images > div::after {
    font-size: 12px;
    padding: 6px 10px;
  }
}
