/* ===================================
   CSS Variables & Base Styles
   =================================== */
:root {
    /* Colors from logo */
    --color-primary: #2d3436;
    --color-accent: #e17055;
    --color-background: #faf8f5;
    --color-surface: #ffffff;
    --color-text: #2d3436;
    --color-text-muted: #636e72;
    --color-border: #dfe6e9;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 8rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-script: 'Caveat', cursive;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 500px;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* ===================================
   Layout
   =================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

section {
    padding: var(--space-3xl) 0;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: #1e272e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

/* ===================================
   Navigation
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-sm) 0;
    transition: all var(--transition-base);
}

.nav.scrolled {
    background-color: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    transition: transform var(--transition-base);
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding: var(--space-xs) 0;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: all var(--transition-base);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-background);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links {
    text-align: center;
}

.mobile-menu-links li {
    margin: var(--space-lg) 0;
}

.mobile-menu-links a {
    font-size: 1.5rem;
    font-weight: 600;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(225, 112, 85, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(45, 52, 54, 0.05) 0%, transparent 40%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 var(--space-md);
}

.hero-logo-wrapper {
    margin-bottom: var(--space-xl);
    animation: fadeInDown 0.8s ease-out;
}

.hero-logo {
    width: 120px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.1));
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4rem);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title-line {
    display: block;
}

.hero-title-accent {
    display: block;
    font-family: var(--font-script);
    color: var(--color-accent);
    font-size: 1.3em;
    font-weight: 500;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto var(--space-xl);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: fadeIn 1s ease-out 1s both;
}

.hero-scroll span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-text-muted), transparent);
    margin: 0 auto;
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* ===================================
   Projects Section
   =================================== */
.projects {
    background-color: var(--color-surface);
}

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

.project-card {
    background-color: var(--color-background);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(30px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-card-featured {
    border: 2px solid var(--color-accent);
}

.project-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background-color: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-badge-coming {
    background-color: var(--color-text-muted);
}

.project-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-md);
}

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

.project-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.project-description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.project-tags li {
    background-color: var(--color-surface);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* ===================================
   About Section
   =================================== */
.about {
    background-color: var(--color-background);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-content .section-title {
    text-align: left;
}

.about-text {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.about-skills {
    margin-top: var(--space-xl);
}

.about-skills h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.skill-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background-color: var(--color-surface);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.skill-icon {
    font-size: 1.25rem;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-logo-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-logo-container::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(225, 112, 85, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.about-logo {
    width: 200px;
    height: auto;
    position: relative;
    z-index: 1;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background-color: var(--color-surface);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    margin-bottom: var(--space-xs);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    padding: var(--space-sm);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
    background-color: var(--color-background);
}

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

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

.btn-submit {
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 200px;
}

/* Thank You Message */
.thank-you-message {
    display: none;
    text-align: center;
    padding: var(--space-2xl);
    animation: fadeInUp 0.5s ease-out;
}

.thank-you-message.visible {
    display: block;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    background-color: #27ae60;
    color: white;
    font-size: 2.5rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.thank-you-message h3 {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}

.thank-you-message p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background-color: var(--color-primary);
    color: var(--color-surface);
    padding: var(--space-2xl) 0;
}

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

.footer-logo {
    margin-bottom: var(--space-lg);
}

.footer-logo img {
    height: 80px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.footer-text {
    opacity: 0.7;
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.footer-tagline {
    font-family: var(--font-script);
    font-size: 1.25rem;
    opacity: 0.9;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0%, 100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .about-visual {
        order: -1;
    }

    .about-content .section-title {
        text-align: center;
    }

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

    .about-logo-container {
        width: 200px;
        height: 200px;
    }

    .about-logo {
        width: 140px;
    }
}

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

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

    .contact-form {
        grid-template-columns: 1fr;
    }

    .form-group-full {
        grid-column: 1;
    }

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

    section {
        padding: var(--space-2xl) 0;
    }

    .hero-scroll {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        width: 100%;
        padding: 0 var(--space-md);
    }

    .btn {
        width: 100%;
    }

    .project-card {
        padding: var(--space-lg);
    }
}

/* ===================================
   Utility Classes
   =================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
