/* CSS Custom Properties */
:root {
    --background: #fafafa;
    --foreground: #171717;
    --card: #ffffff;
    --card-foreground: #171717;
    --primary: #171717;
    --primary-foreground: #fafafa;
    --secondary: #f5f5f5;
    --secondary-foreground: #262626;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --accent: #0d9488;
    --accent-foreground: #fafafa;
    --border: #e5e5e5;
    --input: #e5e5e5;
    --ring: #0d9488;
    --radius: 0.75rem;
}

.dark {
    --background: #141414;
    --foreground: #ededed;
    --card: #1f1f1f;
    --card-foreground: #ededed;
    --primary: #ededed;
    --primary-foreground: #141414;
    --secondary: #292929;
    --secondary-foreground: #ededed;
    --muted: #292929;
    --muted-foreground: #a3a3a3;
    --accent: #2dd4bf;
    --accent-foreground: #141414;
    --border: #333333;
    --input: #333333;
    --ring: #2dd4bf;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        "Libre Franklin",
        system-ui,
        -apple-system,
        sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    min-height: 100vh;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

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

/* Animated Background */
.animated-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: pulse 8s ease-in-out infinite;
}

.dark .gradient-orb {
    opacity: 0.2;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #8b5cf6, var(--accent));
    bottom: -150px;
    left: -100px;
    animation-delay: -3s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
}

.dark .grid-pattern {
    opacity: 0.15;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.1) translate(20px, -20px);
        opacity: 0.6;
    }
}

.dark .gradient-orb {
    animation-name: pulse-dark;
}

@keyframes pulse-dark {
    0%,
    100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1) translate(20px, -20px);
        opacity: 0.3;
    }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s ease;
}

.dark .header {
    background-color: rgba(20, 20, 20, 0.8);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--foreground);
}

.theme-toggle {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--secondary);
    border-color: var(--muted-foreground);
}

.sun-icon,
.moon-icon {
    position: absolute;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.dark .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.dark .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--muted);
    border-color: var(--muted-foreground);
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #22c55e;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}

.hero-title-accent {
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.scroll-indicator {
    color: var(--muted-foreground);
    animation: bounce 2s infinite;
}

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

/* Section Divider */
.section-divider {
    padding: 0 1.5rem;
}

.divider-line {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--border),
        var(--accent),
        var(--border),
        transparent
    );
    max-width: 1200px;
    margin: 0 auto;
}

/* Section Styles */
.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.875rem, 5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 600px;
}

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

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

/* Projects Section */
.projects-section {
    padding: 6rem 0;
}

.projects-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Project Card */
.project-card {
    display: block;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.dark .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image-wrapper {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-image-wrapper.color-teal {
    background-color: #ccfbf1;
}
.project-image-wrapper.color-amber {
    background-color: #fef3c7;
}
.project-image-wrapper.color-rose {
    background-color: #ffe4e6;
}
.project-image-wrapper.color-emerald {
    background-color: #d1fae5;
}
.project-image-wrapper.color-blue {
    background-color: #dbeafe;
}
.project-image-wrapper.color-violet {
    background-color: #ede9fe;
}

.dark .project-image-wrapper.color-teal {
    background-color: #134e4a;
}
.dark .project-image-wrapper.color-amber {
    background-color: #78350f;
}
.dark .project-image-wrapper.color-rose {
    background-color: #881337;
}
.dark .project-image-wrapper.color-emerald {
    background-color: #064e3b;
}
.dark .project-image-wrapper.color-blue {
    background-color: #1e3a8a;
}
.dark .project-image-wrapper.color-violet {
    background-color: #4c1d95;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.project-card:hover .project-title {
    color: var(--accent);
}

.project-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--secondary);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

/* About Section */
.about-section {
    padding: 6rem 0;
}

.about-grid {
    display: grid;
    gap: 4rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

.about-content .section-title {
    margin-bottom: 1.5rem;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.skill-card {
    padding: 1.25rem;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.skill-card:hover {
    background-color: var(--card);
    border-color: var(--accent);
}

.skill-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    border-radius: calc(var(--radius) - 2px);
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.skill-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.skill-description {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.about-image-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-image-container {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
}

.contact-grid {
    display: grid;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-description {
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.contact-item:hover {
    background-color: var(--card);
    border-color: var(--accent);
}

.contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    border-radius: calc(var(--radius) - 2px);
    color: var(--accent);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-bottom: 0.125rem;
}

.contact-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--accent-foreground);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

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

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-input::placeholder {
    color: var(--muted-foreground);
}

.form-input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

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

/* Footer */
.footer {
    padding-bottom: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 2rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-right {
        align-items: flex-end;
    }
}

.copyright {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--foreground);
}

/* Mobile Navigation Adjustments */
@media (max-width: 640px) {
    .nav-link {
        display: none;
    }

    .nav {
        gap: 0.5rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

    .about-stats {
        grid-template-columns: 1fr;
    }
}
