:root {
  --primary: #8B4513;
  --primary-light: #D2B48C;
  --secondary: #2C1810;
  --accent: #CD853F;
  --text: #2C2C2C;
  --text-light: #666;
  --bg: #FEFCF9;
  --card: #FFFFFF;
  --border: #E8E8E8;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --gradient: linear-gradient(135deg, #8B4513 0%, #CD853F 100%);
}

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

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

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

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--gradient);
  color: white;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1.5" fill="rgba(255,255,255,0.03)"/><circle cx="50" cy="10" r="0.8" fill="rgba(255,255,255,0.04)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin-left: 5%;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.coffee-icon {
  display: inline-block;
  animation: steamRise 2s ease-in-out infinite;
}

@keyframes steamRise {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.hero-details a {
  color: inherit;
  text-decoration: none;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.btn-secondary {
  background: transparent;
  color: white;
  border-color: white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-2px);
}

button.btn {
  border: 2px solid transparent;
  font-family: inherit;
  font-size: inherit;
}

/* Sections */
section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.section-line {
  width: 60px;
  height: 4px;
  background: var(--gradient);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

/* Motivation Section */
.motivation-section {
  background: white;
  border-bottom: 1px solid var(--border);
}

.motivation-text {
  font-size: 1.2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-light);
  line-height: 1.8;
}

/* Experience Section */
.experience-section {
  background: var(--bg);
}

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

.job-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  border-left: 4px solid var(--primary);
}

.job-card:hover {
  transform: translateY(-4px);
}

.job-date {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.job-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.job-content h4 {
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 1rem;
}

.job-content ul {
  list-style: none;
}

.job-content li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.job-content li::before {
  content: '☕';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Gallery Section */
.gallery-section {
  background: white;
}

.gallery-grid {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  display: inline-block;
}

.gallery-item:hover {
  transform: translateY(-4px);
}

.gallery-item img {
  display: block;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  transition: transform 0.3s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(139, 69, 19, 0.8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Skills Section */
.skills-section {
  background: var(--bg);
}

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

.skill-card {
  background: var(--card);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-8px);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.skill-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Education Section */
.education-section {
  background: white;
}

.education-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.education-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.education-card h4 {
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 1rem;
}

.education-year {
  color: var(--primary);
  font-weight: 600;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85vw;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: opacity 0.3s ease;
}

.modal-img.loading {
  opacity: 0.7;
}

.image-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.1);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.1);
}

.nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.modal-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-weight: 500;
  background: rgba(0,0,0,0.5);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

/* Footer */
.footer {
  background: var(--secondary);
  color: white;
  text-align: center;
  padding: 2rem 0;
}

.footer a {
  color: var(--primary-light);
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hamburger {
    display: flex;
  }

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

  .hero-details {
    justify-content: center;
    font-size: 0.85rem;
  }

  .job-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .job-date {
    order: 2;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95vw;
    height: 95vh;
  }

  .nav-btn {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }

  .prev-btn {
    left: 10px;
  }

  .next-btn {
    right: 10px;
  }

  .close-btn {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .modal-counter {
    bottom: 20px;
    font-size: 0.9rem;
  }
}
