@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Noto+Serif:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --color-primary: #B8956A;
  --color-tertiary: #E57373;
  --font-heading: 'Noto Serif', serif;
  --font-body: 'Manrope', sans-serif;
  
  /* Light Theme */
  --bg-body: #FAF9F7;
  --bg-surface: #FFFFFF;
  --text-main: #2C2C2C;
  --text-muted: #666;
  --border-color: rgba(44, 44, 44, 0.1);
  --header-bg: transparent;

  /* Backward Compatibility */
  --color-neutral: var(--bg-body);
  --color-secondary: var(--text-main);
}

[data-theme="dark"] {
  --bg-body: #121212;
  --bg-surface: #1A1A1A;
  --text-main: #FAF9F7;
  --text-muted: #A0A0A0;
  --border-color: rgba(255, 255, 255, 0.1);
  --color-neutral: var(--bg-body);
  --color-secondary: var(--text-main);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x:hidden; transition: background-color 0.4s ease, color 0.4s ease; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; color: var(--text-main); }
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
a:hover { color: var(--color-primary); }

.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 40px; }
.primary-btn { display: inline-block; background-color: var(--color-primary); color: #FFF; padding: 16px 32px; font-family: var(--font-body); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; transition: background-color 0.3s ease, transform 0.3s ease; border: none; cursor: pointer; text-align: center; }
.primary-btn:hover { background-color: #a38258; transform: translateY(-2px); }
.section-title { font-size: 3rem; margin-bottom: 3rem; text-align: center; }

/* Reveal Animations */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Static Fade in Up */
.fade-in-up { animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header Elements */
.main-header { padding: 30px 0; border-bottom: 1px solid var(--border-color); position:relative; z-index:100; background: var(--header-bg); transition: background-color 0.4s ease;}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; }
.nav-links { display: flex; gap: 30px; align-items:center; list-style: none; }
.nav-links a { font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }
.nav-btn { padding: 10px 20px !important; margin-left: 10px; font-size: 0.8rem !important; }
.mobile-menu-btn { display: none; background: transparent; border: none; font-size: 1.8rem; cursor: pointer; color: var(--text-main); }
.theme-switch { cursor: pointer; font-size: 1.2rem; margin-right: 20px; transition: transform 0.3s; background: transparent; border: none; color: var(--text-main); }
.theme-switch:hover { transform: rotate(30deg); color: var(--color-primary); }

/* Hero */
.hero { position: relative; padding: 150px 0; min-height: 80vh; display:flex; align-items:center; overflow:hidden;}
.hero-bg-wrapper { position: absolute; top:0; right:0; width: 60%; height: 100%; z-index: -1; }
.hero-bg-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.hero-gradient { position: absolute; top:0; left:0; width: 100%; height: 100%; background: linear-gradient(90deg, var(--bg-body) 0%, var(--bg-body) 30%, transparent 100%); transition: background 0.4s ease;}
.hero-title { font-size: 5rem; line-height: 1.1; margin-bottom: 20px; }
.hero-title .highlight { color: var(--color-primary); }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 40px; font-weight: 300; max-width:500px; color: var(--text-muted);}
.hero-content { z-index: 10; position:relative; }

/* Skills */
.skills-section { background-color: var(--bg-surface); padding: 100px 0; transition: background-color 0.4s ease;}
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card { border: 1px solid var(--border-color); padding: 40px; border-radius: 4px; transition: transform 0.3s ease, box-shadow 0.3s ease; background: var(--bg-surface); }
.skill-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.05); border-color: var(--color-primary); }
[data-theme="dark"] .skill-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.skill-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.skill-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 25px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tags span { background-color: var(--bg-body); padding: 5px 12px; font-size: 0.8rem; border-radius: 20px; border: 1px solid var(--border-color); transition: background-color 0.4s ease; }

/* Projects */
.projects-section { padding: 100px 0; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 60px; }
.project-item { display: block; overflow: hidden; }
.project-image-wrapper { position: relative; overflow: hidden; border-radius: 4px; height: 350px; margin-bottom: 20px; }
.project-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; filter: grayscale(20%); }
.project-item:hover .project-image { filter: grayscale(0%); transform: scale(1.05); }
.project-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(184, 149, 106, 0.85); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.project-item:hover .project-overlay { opacity: 1; }
.view-btn { color: white; font-weight: 600; font-family: var(--font-heading); font-size: 1.2rem; }
.project-info { padding: 0 5px; text-align: center; }
.project-title { font-size: 1.6rem; margin-bottom: 5px; }
.project-category { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; font-weight:600;}

/* Outline Button */
.outline-btn { display: inline-block; background-color: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); padding: 16px 32px; font-family: var(--font-body); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; transition: all 0.3s ease; cursor: pointer; text-align: center; }
.outline-btn:hover { background-color: var(--color-primary); color: white; transform: translateY(-2px); }

/* Contact Section & Premium Form Design */
.contact-section { padding: 120px 0; background: var(--bg-surface); transition: background-color 0.4s ease; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;}
.contact-text { color: var(--text-muted); font-size: 1.1rem; line-height: 1.8; }
.success-msg { width: 100%; margin: 0 auto 30px; background: #27C93F; color: white; padding: 15px; border-radius: 4px; text-align:center;}
.contact-form-container { background: var(--bg-body); color: var(--text-main); padding: 60px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.05); border: 1px solid var(--border-color); transition: background-color 0.4s ease; }
[data-theme="dark"] .contact-form-container { box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.form-row { display: flex; gap: 30px; margin-bottom: 30px; }
.form-group-half { flex: 1; }
.form-group-full { margin-bottom: 30px; }
.contact-form label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); transition: color 0.4s ease; }
.form-input { width: 100%; padding: 12px 0; border: none; border-bottom: 1px solid var(--border-color); border-radius: 0; background: transparent; font-family: var(--font-body); font-size: 1.1rem; color: var(--text-main); transition: border-color 0.3s, color 0.4s ease; }
.form-input:focus { outline: none; border-bottom-color: var(--color-primary); }
.text-area { min-height: 150px; resize: vertical; }
.submit-btn-full { width: 100%; font-size:1rem; padding:18px;}

/* Footer */
.main-footer { text-align: center; padding: 40px 0; border-top: 1px solid var(--border-color); font-size: 0.9rem; color: var(--text-muted); }

/* Mobile Formatting */
@media (max-width: 991px) {
    .container { padding: 0 20px; }
    
    .hero { padding: 40px 0 60px; min-height: auto; flex-direction:column; align-items:flex-start; text-align:center;}
    .hero-bg-wrapper { width: 100%; position:relative; height: 350px; order: 2; margin-top:40px; border-radius:0; z-index: 1;}
    .hero-gradient { display:block; background: linear-gradient(180deg, var(--bg-body) 0%, transparent 40%, transparent 100%); width:100%; height:100%; top:0; left:0;}
    .hero-inner-flex { order: 1; display:flex; justify-content:center; width:100%; }
    .hero-content { display:flex; flex-direction:column; align-items:center; }
    .hero-title { font-size: 2.8rem; margin-bottom:15px; }
    .hero-subtitle { margin: 0 auto 30px auto; }
    
    .section-title { font-size: 2.2rem; }
    
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .form-row { flex-direction: column; gap: 20px; }
    .contact-form-container { padding:20px; }
    
    .projects-grid, .skills-grid { grid-template-columns: 1fr; }
    .project-image-wrapper { height: 280px; }
    
    .mobile-menu-btn { display: block; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-surface); padding: 20px; text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.05); z-index: 99; border-top: 1px solid var(--border-color); }
    .nav-links.active { display: flex !important; }
    .nav-links a { display: block; padding: 15px 0; }
    .nav-btn { display: inline-block; margin: 10px auto 0; }
    .theme-switch { display: inline-block; margin: 10px auto 0; }
}
