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

:root {
    --bg: #ffffff;
    --text: #000000;
    --text-secondary: #666666;
    --border: #e5e5e5;
    --accent: #000000;
    --cobalt: #0052CC;
    --spacing: 1rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --text: #ffffff;
        --text-secondary: #999999;
        --border: #333333;
        --accent: #ffffff;
        --cobalt: #0052CC;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem var(--spacing);
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}

nav .logo {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.6;
}

.admin-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.admin-btn:hover {
    background: var(--cobalt);
    color: #ffffff;
    border-color: var(--cobalt);
}

.admin-btn:active {
    background: #003da5;
    border-color: #003da5;
}

/* Hero / Intro Section */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem var(--spacing) 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 2rem var(--spacing);
        gap: 2rem;
    }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero h1 .hero-name {
    color: var(--cobalt);
}

.hero h1 .hero-title {
    color: var(--text);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 1.75rem;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--bg);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: var(--cobalt);
    border-color: var(--cobalt);
}

.btn:active {
    background: #003da5;
    border-color: #003da5;
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background: var(--cobalt);
    color: #ffffff;
    border-color: var(--cobalt);
}

.btn-secondary:active {
    background: #003da5;
    color: #ffffff;
    border-color: #003da5;
}

.hero-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
}

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

/* Featured Project */
.featured-section {
    max-width: 1200px;
    margin: 4rem auto 0;
    padding: 0 var(--spacing);
    border-top: 1px solid var(--border);
    padding-top: 4rem;
}

.featured-section h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.featured-project {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .featured-project {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.featured-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    order: -1;
}

@media (max-width: 768px) {
    .featured-image {
        order: 0;
    }
}

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

.featured-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.featured-content .meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.featured-content .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: var(--border);
    color: var(--text);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Portfolio Grid */
.portfolio-section {
    max-width: 1200px;
    margin: 4rem auto 0;
    padding: 0 var(--spacing);
    border-top: 1px solid var(--border);
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.portfolio-section h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

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

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

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.project-tag {
    background: var(--border);
    color: var(--text);
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Admin Panel */
.admin-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.admin-panel.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.admin-content {
    background: var(--bg);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    margin-top: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.admin-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

.admin-content h2 {
    margin-bottom: 2rem;
    padding-right: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

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

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

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions button {
    flex: 1;
}

.admin-projects-list {
    margin-bottom: 2rem;
}

.admin-project-item {
    background: var(--border);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-project-item button {
    padding: 0.4rem 0.8rem;
    margin-left: 0.5rem;
    font-size: 0.85rem;
}

.footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem var(--spacing);
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Admin View Styles */
#adminView nav {
    justify-content: space-between;
}

#adminView nav .logo {
    font-weight: 700;
}

#adminView h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

#adminView h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Contact Modal - Full Screen Black */
.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    background: #000;
    overflow: hidden;
}

.contact-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeToBlack 0.6s ease-out forwards;
}

.contact-overlay.closing {
    animation: fadeFromBlack 0.6s ease-out forwards;
}

@keyframes fadeToBlack {
    from {
        background: transparent;
    }
    to {
        background: #000;
    }
}

@keyframes fadeFromBlack {
    from {
        background: #000;
    }
    to {
        background: transparent;
    }
}

/* Contact Info Container */
.contact-info-container {
    position: relative;
    z-index: 2001;
    text-align: center;
}

.contact-info-line {
    font-size: 1.8rem;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 2px;
    margin: 1.5rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.contact-info-line span {
    display: inline-block;
    color: #ffffff;
    clip-path: inset(0 100% 0 0);
    opacity: 0;
}

.contact-info-container.show .contact-info-line span {
    animation: revealAndFadeFromLeft 1.2s ease-out forwards;
}

.contact-info-container.show .contact-info-line:nth-child(1) span {
    animation-delay: 0.6s;
}

.contact-info-container.show .contact-info-line:nth-child(2) span {
    animation-delay: 0.9s;
}

.contact-info-container.show .contact-info-line:nth-child(3) span {
    animation-delay: 1.2s;
}

@keyframes revealAndFadeFromLeft {
    from {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    to {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}
