
:root {
  --bg-color: #F8EDE3; /* Cream base */
  --surface-color: #F1E4D5; /* Slightly darker cream for cards */
  --surface-color-light: #E7D8C6;
  --accent-primary: #4C5F4F; /* Dark Sage */
  --accent-secondary: #647B66; /* Medium Sage / Highlight */
  --text-primary: #1E281E; /* Very Dark green for readable main text */
  --text-secondary: #4C5F4F; /* Dark Sage for subtitles */
  
  --font-display: 'Syncopate', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-snappy: 0.2s cubic-bezier(0, 0.5, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle Techy Grid Background */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: 50px 50px;
  background-image: linear-gradient(to right, rgba(121, 135, 119, 0.1) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(121, 135, 119, 0.1) 1px, transparent 1px);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.highlight {
  color: var(--accent-secondary);
}

.subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 4px;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-snappy);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
}

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

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #F8EDE3;
  box-shadow: 0 4px 15px rgba(121, 135, 119, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-secondary);
  box-shadow: 0 6px 20px rgba(162, 178, 159, 0.4);
  transform: translateY(-2px);
}

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

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

.cta-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(248, 237, 227, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(121, 135, 119, 0.15);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 2px;
}

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

.navbar nav a {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
}

.navbar nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-secondary);
  transition: width var(--transition-smooth);
}

.navbar nav a:hover::after,
.navbar nav a.active::after {
  width: 100%;
}

.navbar nav a:hover {
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 10%;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero .title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero .description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 800px;
}

/* Abstract Tech Visual */
.hero-visual {
  position: absolute;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  z-index: 1;
}

.tech-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(121, 135, 119, 0.3);
  box-shadow: 0 0 50px rgba(121, 135, 119, 0.1);
  animation: spin 30s linear infinite;
  background: radial-gradient(circle, rgba(121, 135, 119, 0.05) 0%, transparent 60%);
}

.tech-circle.small {
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border: 1px dashed rgba(121, 135, 119, 0.3);
  animation: spin-reverse 20s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Section Common */
.section-header {
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.section-header h2 {
  font-size: 2rem;
  white-space: nowrap;
}

.section-header .line {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-primary) 0%, transparent 100%);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 3fr 2fr;
    gap: 12rem;
    align-items: center;
  }
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.skills-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .skills-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-category h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h4::before {
  content: '▹';
  color: var(--accent-secondary);
  font-family: monospace;
  font-size: 1.1rem;
}

.skill-category p {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0 !important;
  font-weight: 600;
  padding-left: 1.2rem;
}

.about-image {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  object-fit: cover;
  object-position: center;
  border: 4px solid var(--accent-primary);
  box-shadow: -15px 15px 0 var(--surface-color), -15px 15px 0 4px var(--accent-secondary);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.about-image img:hover {
  transform: translateY(-8px) translate(-4px, 4px);
  box-shadow: -20px 20px 0 var(--surface-color), -20px 20px 0 4px var(--accent-secondary);
}

/* Projects Section */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
}

.project-card {
  background-color: var(--surface-color);
  border: 1px solid var(--surface-color-light);
  border-radius: 8px;
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(121, 135, 119, 0.15), 0 0 20px rgba(121, 135, 119, 0.05);
  border-color: rgba(121, 135, 119, 0.3);
}

.project-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  position: relative;
  background-color: var(--surface-color-light);
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform var(--transition-smooth);
}

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

.project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tech-stack {
  display: flex;
  gap: 1rem;
  list-style: none;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--accent-secondary);
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.project-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  align-self: flex-start;
}

.project-link:hover {
  color: var(--accent-secondary);
  gap: 0.75rem;
}

/* Contact Section */
.contact {
  padding-bottom: 10rem;
}

.contact .description {
  max-width: 600px;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.contact-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background-color: var(--surface-color);
  border-top: 1px solid var(--surface-color-light);
  font-family: var(--font-display);
  letter-spacing: 1px;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* Media Queries */
@media (max-width: 768px) {
  .hero-visual {
    opacity: 0.3;
  }
  .navbar {
    padding: 1rem;
  }
  .cta-group {
    flex-direction: column;
  }
  .navbar nav ul {
    display: none; /* simple mobile fallback */
  }
}
