/* ===== CSS VARIABLES ===== */
:root {
  /* Colors */
  --color-primary: #fff5f2;
  --color-primary-weak: #fffbf9;
  --color-primary-strong: #ffe8e1;
  --color-primary-border: #f3e6e1;
  --on-primary: #1f2933;

  --bg: #ffffff;
  --surface: #fff9f7;
  --border: #e9e2df;

  --text: #1f2933;
  --text-muted: #4b5563;
  --text-subtle: #6b7280;

  --accent-warm: #d97a5e;
  --accent-cool: #6faf97;
  --accent-pro: #4f46e5;
  --accent-gold: #e9b949;

  --hover: #ffede7;
  --pressed: #ffdcd0;
  --focus-ring: #f7afa2;

  --success: #2e7d32;
  --warning: #b45309;
  --error: #b91c1c;
  --info: #2563eb;

  /* Gradients */
  --grad-peach: linear-gradient(135deg, #fff5f2 0%, #ffe8e1 45%, #ffd8cc 100%);
  --grad-brand: linear-gradient(135deg, #6faf97, #4f46e5);
  --grad-warm: linear-gradient(135deg, #fff5f2, #d97a5e);

  /* Spacing */
  --section-padding: 4rem 0;
  --container-padding: 1rem;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--section-padding);
}

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

.section-title h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title p {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: center;
}

.btn-primary {
  background: var(--grad-brand);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--hover);
  border-color: var(--accent-warm);
}

/* ===== HEADER & NAVIGATION ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(31, 41, 51, 0.08);
}

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

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: none;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

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

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: var(--grad-brand);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

.menu-toggle.active {
  transform: rotate(90deg);
}

/* Mobile Navigation Menu */
@media (max-width: 767px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(31, 41, 51, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    margin: 0;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links a:hover {
    background: var(--hover);
    transform: translateX(10px);
  }

  .nav-links a.active {
    background: var(--color-primary);
    color: var(--accent-warm);
  }
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--grad-peach);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23f3e6e1" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.1;
}

.hero-sec {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideInLeft 1s ease-out;
}

.hero-content .subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-content p {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--text-subtle);
  margin-bottom: 2rem;
  max-width: 500px;
  animation: slideInLeft 1s ease-out 0.4s both;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 300px;
  animation: slideInLeft 1s ease-out 0.6s both;
}

.cta-buttons .btn {
  width: 100%;
  min-height: 48px;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInRight 1s ease-out 0.8s both;
}

.profile-card {
  background: var(--bg);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(31, 41, 51, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.profile-card:hover {
  transform: rotate(2deg) scale(1.02);
}

.profile-card img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ===== ABOUT SECTION ===== */
.about {
  background: var(--surface);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.about-image {
  position: relative;
  width: 100%;
  max-width: 280px;
}

.about-image::before {
  content: "";
  position: absolute;
  top: -15px;
  left: -15px;
  right: 15px;
  bottom: 15px;
  background: var(--grad-warm);
  border-radius: 20px;
  z-index: -1;
}

.about-card {
  width: 300px;
  height: 300px;
  background: var(--grad-peach);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent-warm);
}

.about-content i {
  font-size: 20rem;
}

.about-text h3 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  margin-bottom: 1rem;
  color: var(--text);
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  width: 100%;
}

.skill-item {
  background: var(--bg);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(31, 41, 51, 0.05);
  transition: transform 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-item i {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--accent-pro);
}

.skill-item h4 {
  font-size: 0.9rem;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(31, 41, 51, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(31, 41, 51, 0.15);
}

.project-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent-warm);
}

.first .project-image {
  background-color: #949393;
}

.second .project-image {
  background-color: #0c5873;
}

.third .project-image {
  background-color: #0a0a0a;
}

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

.project-container {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-descrip {
  flex: 1;
}

.project-descrip h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.project-descrip p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: var(--color-primary);
  color: var(--on-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.project-links a {
  color: var(--accent-pro);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.project-links a:hover {
  color: var(--accent-warm);
}

/* ===== CONTACT SECTION ===== */
.contact {
  background: var(--surface);
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
}

.contact-info h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 1rem;
  color: var(--text);
  text-align: center;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  text-align: center;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.contact-method:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(31, 41, 51, 0.1);
}

.contact-method i {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.contact-method div {
  flex: 1;
}

.contact-method strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.contact-method p {
  font-size: 0.8rem;
  margin: 0;
  color: var(--text-muted);
}

.contact-form {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(31, 41, 51, 0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.3s ease;
  background: var(--bg);
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-pro);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form .btn-primary {
  width: 100%;
}

/* ===== FOOTER ===== */
.footer {
  background: #ffe0d7;
  color: var(--text);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.footer span {
  color: var(--accent-warm);
  font-weight: bold;
}

/* ===== ANIMATIONS ===== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

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

/* Hide about image on small screens */
@media (max-width: 991.8px) {
  .about-image {
    display: none;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  :root {
    --section-padding: 5rem 0;
    --container-padding: 1.5rem;
  }

  .container {
    max-width: 540px;
  }

  .logo {
    font-size: 1.4rem;
  }

  .cta-buttons {
    flex-direction: row;
    justify-content: center;
    max-width: 400px;
  }

  .cta-buttons .btn {
    flex: 1;
    min-width: 180px;
  }

  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .project-links {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 576px) and (max-width: 767.8px) {
  .cta-buttons {
    margin: 0 auto;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  :root {
    --section-padding: 6rem 0;
  }

  .container {
    max-width: 720px;
  }

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

  .menu-toggle {
    display: none;
  }

  .logo {
    font-size: 1.5rem;
  }

  .hero-sec {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    text-align: left;
  }

  .hero-content {
    order: 1;
  }

  .hero-image {
    order: 2;
  }

  .cta-buttons {
    justify-content: flex-start;
  }

  .about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: left;
  }

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

  .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .contact-info h3,
  .contact-info p {
    text-align: left;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }

  .hero-sec {
    gap: 4rem;
  }

  .about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    text-align: left;
  }

  .about-image {
    max-width: 300px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .contact-content {
    gap: 4rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Extra extra large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-warm);
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-warm);
}
