/* ===== VINTAGE NEWSPAPER PORTFOLIO ===== */
/* Inspired by classic magazine/newspaper layouts */

/* ===== CSS VARIABLES ===== */
:root {
    --paper: #f5f0e8;
    --paper-dark: #e8e0d4;
    --ink: #0a0a0a;
    --ink-light: #1a1a1a;
    --ink-faded: #3d3d3d;
    --accent-red: #c41e3a;
    --accent-red-dark: #9e1830;
    --border-color: #1a1a1a;
    
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'EB Garamond', Georgia, serif;
    --font-mono: 'Special Elite', 'Courier New', monospace;
    
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--paper);
    color: var(--ink);
    line-height: 1.7;
    font-size: 17px;
    overflow-x: hidden;
}

/* ===== GRAIN OVERLAY ===== */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== NEWSPAPER CONTAINER ===== */
.newspaper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background-color: var(--paper);
    position: relative;
}

/* ===== MASTHEAD ===== */
.masthead {
    text-align: center;
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.masthead-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink-faded);
    margin-bottom: 15px;
    padding: 0 20px;
}

.newspaper-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.masthead-tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: italic;
    color: var(--ink-faded);
    letter-spacing: 1px;
}

.masthead-border {
    height: 4px;
    background: var(--ink);
    margin-top: 20px;
    position: relative;
}

.masthead-border::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ink);
}

/* ===== SECTION LABELS ===== */
.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ink-faded);
    margin-bottom: 10px;
}

.highlight-red {
    background-color: var(--accent-red);
    color: white;
    padding: 4px 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 40px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.headline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--ink);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.hero-image-container {
    position: relative;
}

.hero-image {
    width: 100%;
    filter: grayscale(100%) contrast(1.1);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.hero-image:hover {
    filter: grayscale(80%) contrast(1.05);
}

.stamp {
    position: absolute;
    top: 15px;
    right: -15px;
    background: var(--paper);
    border: 2px solid var(--accent-red);
    padding: 10px 15px;
    transform: rotate(12deg);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-align: center;
    letter-spacing: 2px;
    color: var(--accent-red);
    line-height: 1.4;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.stamp:hover {
    background: var(--accent-red);
    color: white;
    transform: rotate(8deg) scale(1.05);
}

.hero-text {
    text-align: justify;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 15px 0 20px 0;
    line-height: 1.2;
}

.hero-text p {
    margin-bottom: 1.2em;
    line-height: 1.8;
}

/* Resume Badge */
.resume-badge {
    display: inline-block;
    background-color: var(--accent-red);
    color: white;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    border: 2px solid var(--accent-red);
}

.resume-badge:hover {
    background-color: var(--paper);
    color: var(--accent-red);
}

/* ===== DROP CAP ===== */
.drop-cap::first-letter {
    float: left;
    font-family: var(--font-display);
    font-size: 4.5rem;
    line-height: 0.8;
    padding-right: 12px;
    padding-top: 8px;
    color: var(--ink);
    font-weight: 700;
}

/* ===== DIVIDERS ===== */
.divider {
    height: 1px;
    background: var(--ink);
    margin: 50px 0;
    position: relative;
}

.divider::before {
    content: '§';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--paper);
    padding: 0 15px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--ink-faded);
}

/* ===== FEATURED SECTION ===== */
.featured-section {
    padding: 20px 0;
}

.featured-header {
    margin-bottom: 20px;
}

.featured-subtitle {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    margin-left: 10px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.big-headline {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -3px;
    margin-bottom: 30px;
    color: var(--ink);
    transition: var(--transition);
}

.project-link {
    text-decoration: none;
    color: inherit;
}

.project-link:hover .big-headline {
    color: var(--accent-red);
}

.featured-content {
    column-count: 2;
    column-gap: 30px;
    text-align: justify;
    margin-bottom: 30px;
}

.featured-content p {
    margin-bottom: 1.2em;
}

.pull-quote {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--accent-red);
    padding: 20px;
    border-left: 3px solid var(--accent-red);
    margin-top: 20px;
    background: rgba(196, 30, 58, 0.05);
}

.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-preview img {
    width: 100%;
    filter: grayscale(100%) contrast(1.2);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-preview img:hover {
    filter: grayscale(60%) contrast(1.1);
}

/* ===== EDITOR SECTION ===== */
.editor-section {
    padding: 20px 0;
}

.editor-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.editor-image-container {
    margin: 20px 0;
}

.editor-image-container img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    border: 1px solid var(--border-color);
}

.editor-headline {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 25px;
    color: var(--ink);
}

.editor-content.two-column {
    column-count: 2;
    column-gap: 30px;
    text-align: justify;
}

.editor-content p {
    margin-bottom: 1.2em;
}

.signature-quote {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--accent-red);
    font-size: 1.1rem;
    margin-top: 20px;
    column-span: all;
}

.editor-portrait img {
    width: 100%;
    filter: grayscale(100%) contrast(1.3) brightness(0.9);
    border: 1px solid var(--border-color);
}

/* ===== PROJECTS SECTION ===== */
.projects-section {
    padding: 20px 0;
}

.section-headline {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--ink);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 20px;
}

.project-card {
    border: 1px solid var(--border-color);
    background: var(--paper);
    transition: var(--transition);
    overflow: hidden;
}

/* Non-uniform grid layout */
.project-card:nth-child(1) {
    grid-column: span 6;
    grid-row: span 2;
}

.project-card:nth-child(2) {
    grid-column: span 6;
    grid-row: span 2;
}

.project-card:nth-child(3) {
    grid-column: span 4;
    grid-row: span 2;
}

.project-card:nth-child(4) {
    grid-column: span 4;
    grid-row: span 2;
}

.project-card:nth-child(5) {
    grid-column: span 4;
    grid-row: span 2;
}

.project-card:nth-child(6) {
    grid-column: span 6;
    grid-row: span 2;
}

.project-card:nth-child(7) {
    grid-column: span 6;
    grid-row: span 2;
}

.project-card:nth-child(8) {
    grid-column: span 5;
    grid-row: span 2;
}

.project-card:nth-child(9) {
    grid-column: span 7;
    grid-row: span 2;
}

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

.project-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-image {
    overflow: hidden;
    flex: 1;
    min-height: 180px;
    position: relative;
}

/* Different aspect ratios for different card sizes */
.project-card:nth-child(1) .project-image,
.project-card:nth-child(2) .project-image {
    min-height: 220px;
}

.project-card:nth-child(6) .project-image,
.project-card:nth-child(7) .project-image {
    min-height: 220px;
}

.project-card:nth-child(9) .project-image {
    min-height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(100%) contrast(1.1);
    transition: var(--transition);
}

.project-card:hover .project-image img {
    filter: grayscale(50%) contrast(1.05);
    transform: scale(1.05);
}

.project-info {
    padding: 20px;
    background: var(--paper);
}

.project-label {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.75rem;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

/* Larger titles for bigger cards */
.project-card:nth-child(1) .project-info h3,
.project-card:nth-child(2) .project-info h3 {
    font-size: 1.5rem;
}

.project-card:nth-child(6) .project-info h3,
.project-card:nth-child(7) .project-info h3,
.project-card:nth-child(9) .project-info h3 {
    font-size: 1.5rem;
}

.project-info p {
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.6;
    font-weight: 500;
}

/* ===== SKILLS SECTION ===== */
.skills-section {
    padding: 40px 0;
    text-align: center;
}

.skills-section .section-headline {
    margin-bottom: 40px;
}

.skills-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px 35px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    cursor: default;
}

.skill-item svg {
    width: 32px;
    height: 32px;
    color: var(--ink);
    transition: var(--transition);
    opacity: 0.8;
}

.skill-item:hover svg {
    color: var(--accent-red);
    transform: scale(1.1);
    opacity: 1;
}

.skill-name {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--ink-faded);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 40px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 30px;
}

.contact-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: justify;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-link {
    display: block;
    text-decoration: none;
    color: var(--ink);
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--accent-red);
}

.link-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink-faded);
    margin-bottom: 5px;
}

.link-value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--ink);
    padding: 10px 20px;
    border: 1px solid var(--ink);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--ink);
    color: var(--paper);
}

/* ===== CONTACT FORM ===== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink-faded);
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid var(--border-color);
    background: var(--paper);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    transition: var(--transition);
}

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

.submit-btn {
    padding: 15px 30px;
    background: var(--ink);
    color: var(--paper);
    border: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
}

.submit-btn:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--ink);
}

/* ===== FOOTER ===== */
.footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 2px solid var(--ink);
}

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

.footer-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

.footer-links {
    display: flex;
    gap: 25px;
}

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-faded);
    transition: var(--transition);
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .newspaper {
        padding: 30px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-text {
        column-count: 1;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-content {
        column-count: 1;
    }
    
    .editor-grid {
        grid-template-columns: 1fr;
    }
    
    .editor-content.two-column {
        column-count: 1;
    }
    
    .editor-right {
        order: -1;
    }
    
    .projects-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .project-card:nth-child(1) {
        grid-column: span 6;
        grid-row: span 2;
    }
    
    .project-card:nth-child(2),
    .project-card:nth-child(3),
    .project-card:nth-child(4),
    .project-card:nth-child(5) {
        grid-column: span 3;
        grid-row: span 2;
    }
    
    .project-card:nth-child(6),
    .project-card:nth-child(7),
    .project-card:nth-child(8),
    .project-card:nth-child(9) {
        grid-column: span 3;
        grid-row: span 2;
    }
    
    .skills-icons {
        gap: 15px;
    }
    
    .skill-item {
        width: 45px;
        height: 45px;
    }
    
    .skill-item svg {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    .newspaper {
        padding: 15px;
    }
    
    .masthead-top {
        flex-direction: column;
        gap: 8px;
    }
    
    .newspaper-title {
        font-size: 2rem;
    }
    
    .masthead-tagline {
        font-size: 0.85rem;
    }
    
    .hero-section {
        padding: 20px 0;
    }
    
    .hero-section .lead-text {
        font-size: 1rem;
        text-align: left;
        hyphens: auto;
    }
    
    .section-headline {
        font-size: 1.5rem;
    }
    
    .section-label {
        font-size: 0.65rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .project-card:nth-child(n) {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .project-image {
        min-height: 160px;
    }
    
    .project-info {
        padding: 15px;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .skills-icons {
        gap: 12px;
    }
    
    .skill-item {
        width: 40px;
        height: 40px;
    }
    
    .skill-item svg {
        width: 28px;
        height: 28px;
    }
    
    .skill-item::after {
        display: none;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-text {
        text-align: left;
        font-size: 1rem;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .drop-cap::first-letter {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .newspaper {
        padding: 12px;
    }
    
    .masthead {
        padding-bottom: 15px;
        margin-bottom: 20px;
    }
    
    .newspaper-title {
        font-size: 1.6rem;
    }
    
    .stamp {
        position: static;
        transform: none;
        margin-top: 10px;
        display: inline-block;
        padding: 8px 15px;
        font-size: 0.7rem;
    }
    
    .stamp:hover {
        transform: scale(1.05);
    }
    
    .hero-section .lead-text {
        font-size: 0.95rem;
    }
    
    .project-image {
        min-height: 140px;
    }
    
    .skills-icons {
        gap: 10px;
    }
    
    .skill-item {
        width: 36px;
        height: 36px;
    }
    
    .skill-item svg {
        width: 24px;
        height: 24px;
    }
    
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-link {
        text-align: center;
    }
    
    .submit-btn {
        width: 100%;
        padding: 15px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .grain-overlay {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .project-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: var(--accent-red);
    color: white;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--paper-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--ink-faded);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ink);
}
