/* Base Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #fdfbf7;
    --bg-secondary: #f7f3eb;
    --bg-tertiary: #efe9dd;
    --accent: #b8860b;
    --accent-hover: #9a7209;
    --accent-light: #d4a84b;
    --accent-glow: rgba(184, 134, 11, 0.15);
    --text-primary: #2d2a26;
    --text-secondary: #5c574f;
    --text-muted: #8a8279;
    --border: #e0d8c8;
    --border-dark: #c9bfab;
}

html {
    scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: 1.125rem; font-weight: 500; }

p { color: var(--text-secondary); }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

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

.section-label {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.75rem;
}

/* Decorative divider */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-dark), transparent);
}

.divider-icon {
    color: var(--accent);
    font-size: 0.875rem;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

nav.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

.nav-logo {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.1em;
}

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

.nav-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

@media (max-width: 640px) {
    .nav-links { display: none; }
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 6rem 1.5rem 4rem;
    background:
        radial-gradient(ellipse at 50% 0%, var(--accent-glow) 0%, transparent 50%),
        var(--bg-primary);
}

.hero-content {
    max-width: 700px;
}

.hero-emblem {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-dark);
    border-radius: 50%;
    position: relative;
}

.hero-emblem::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid var(--border);
    border-radius: 50%;
}

.hero-emblem svg {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.875rem 2rem;
    border-radius: 2px;
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.2);
}

.hero-cta:hover {
    background: var(--accent-hover);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* About */
.about {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-content {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.0625rem;
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Tech Stack */
.tech-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .tech-categories {
        grid-template-columns: 1fr 1fr;
    }
}

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

.tech-category-title {
    font-family: 'Cinzel', serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tech-item:hover {
    border-color: var(--accent-light);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.tech-icon {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    width: 24px;
    text-align: center;
}

.tech-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Services */
.services {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.service-card {
    flex: 0 1 280px;
    max-width: 320px;
    padding: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 2px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    border-color: var(--accent-light);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
}

.service-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.service-card h3 {
    margin-bottom: 0.75rem;
    font-family: 'Cinzel', serif;
}

.service-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Contact */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    margin-bottom: 2.5rem;
}

.contact-intro p {
    font-size: 1.0625rem;
}

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

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-link:hover {
    border-color: var(--accent-light);
    box-shadow: 0 2px 12px var(--accent-glow);
    color: var(--text-primary);
}

.contact-link svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.contact-form {
    text-align: left;
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: 2px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-submit:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Honeypot field - hidden from real users */
.form-honey {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Form messages */
.form-message {
    padding: 1rem;
    border-radius: 2px;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(34, 139, 34, 0.1);
    border: 1px solid rgba(34, 139, 34, 0.3);
    color: #228b22;
}

.form-message.error {
    display: block;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #dc3545;
}

/* Footer */
footer {
    padding: 2.5rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-logo {
    font-family: 'Cinzel', serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

footer p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

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

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

/* Mobile adjustments */
@media (max-width: 640px) {
    section {
        padding: 4rem 0;
    }

    .hero {
        padding-top: 5rem;
    }

    .hero-emblem {
        width: 64px;
        height: 64px;
    }

    .hero-emblem svg {
        width: 26px;
        height: 26px;
    }
}
